123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569 |
- function showSuccessMessage(msg) {
- layer.msg(msg, {
- icon: 1
- })
- }
- function showErrorMessage(msg) {
- layer.msg(msg, {
- icon: 5
- })
- }
- function showWarningMessage(msg) {
- layer.msg(msg, {
- icon: 2
- })
- }
- function showInfoMessage(msg) {
- layer.msg(msg, {
- icon: 6
- })
- }
- var httpData=GetRequest();
- new Vue({
- el: '#app',
- data: {
- modal: '',
- type: '',
- status: '',
- name: '',
- isDanger: '1',
- pagesize: 10,
- total: 0,
- pagetotal: 0, //总页数
- currentPage: 1, //当前页数
- tablelist: [],
- types: [],
- Statics: {},
- scListItem:'',
- wujilu: false,
- value1:'',
- datamodelshow: true,
- centerDialogVisible: false,
- surveyResultCode:"",
- isloading:false,
- docInfo:JSON.parse(window.localStorage.getItem('docInfo')),
- jiayiShow:false,
- doctorMobile:'',
- newDropdownItems: [
- ],
- selectedNewDropdown: ''
- },
- created:function() {
-
- },
- watch:{
- },
- mounted: function () {
- var vm = this
- // vm.scListItem={
- // id: 3297,
- // code: "e95d50219c71401ba4fb52a63faf821f",
- // templateCode: "6bcd306aaafb4e4381071346d86fadbb1",
- // templateTitle: "ASCVD风险评估",
- // disease: 3,
- // doctor: "361aef4891de492cb0e6a47cf9fe31f3",
- // doctorMobile: "15200000001",
- // patientCode: "0fab4dd67e074e16ac86db6b6c15233e",
- // photo: "group1/M01/23/EF/Cl8WjGUL6EeAUdSeAATf8kYXf5o571.png",
- // openId: null,
- // patientName: "黄小蕾",
- // screenResultCode: "1",
- // screenResultScore: -1,
- // screenResult: "超高危",
- // isDanger: 1,
- // isOrder: 0,
- // following: 0,
- // isEducate: 0,
- // over: 1,
- // reservationCode: null,
- // czrq: "2024-10-18 15:04:50",
- // isAgain: 1,
- // parentCode: null,
- // originCode: "e95d50219c71401ba4fb52a63faf821f",
- // adviceCode: null,
- // otherAdvice: null,
- // source: 1,
- // updateTime: null,
- // idcard: "650101198007121633",
- // sex: "1",
- // age: 44,
- // level: 0,
- // doctorName: null,
- // isThird: null,
- // thirdId: null,
- // thirdSource: "4",
- // thirdAdvice: "应定期到医院进行检查,积极采取各类措施,并服用一些必要的药物进行预防。针对超高危人群的低密度脂蛋白胆固醇推荐目标值为<1.4mmol/L",
- // doctorNameReservation: null,
- // czrqReservation: null,
- // startTimeReservation: null,
- // surveyStatus: null,
- // hospitalName: null,
- // value1: null,
- // value2: null,
- // doctorIdcard: null,
- // hospital: null,
- // town: null,
- // mobile: null,
- // birthday: null
- // }
- // vm.name=vm.scListItem.patientName
- if(httpData.scListItem){
- vm.scListItem=JSON.parse(decodeURIComponent(httpData.scListItem))
- vm.name=vm.scListItem.patientName
- console.log('3333333333333333',JSON.parse(decodeURIComponent(httpData.scListItem)))
- }
- vm.getModal()
- // 初始化Bootstrap下拉菜单
- // 专科
- if(vm.docInfo.level == '1') {
- vm.getList()
- }else{
- vm.getDatas()
- }
- vm.gettypes()
- vm.getDraopDown()
- parent.eventBuss.$on('guan_results',function(index){
- top.layer.close(index)
- if(vm.docInfo.level == '1') {
- vm.getList()
- }else{
- vm.getDatas()
- }
- vm.getModal()
- })
- },
- methods: {
- selectTemplate: function (template) {
- this.templateCode = template.code
- $('#TemplateCode').val(template.name)
- },
- lianxijiayi:function(data) {
- this.doctorMobile = data.doctorMobile
- this.jiayiShow = true
- },
- centerDialogClick:function() {
- var vm = this
- var docInfo=JSON.parse(window.localStorage.getItem('docInfo'));
- this.centerDialogVisible = false
- vm.isloading = true
- jbscAPI.changeSurveyState({
- surveyResultCode:this.surveyResultCode, //问卷code
- surveyStatus:1, //surveyStatus =1 社区随访--已管理
- doctorCode:docInfo.code //医生code
- }).then(function(res){
- if(res.status == 200) {
- showSuccessMessage('操作成功')
- vm.isloading = false
- if(vm.docInfo.level == '1') {
- vm.getList()
- }else{
- vm.getDatas()
- }
- vm.getModal()
- }
- })
- },
- //获取筛查数据模型
- getModal: function () {
- var vm = this
- jbscAPI.screenStatics({
- type:vm.docInfo.level==1?"2":'1' // 类型 1全科 2专科(默认1)
- }).then(function (res) {
- if (res.status == 200) {
- vm.Statics = res.data
- } else {
- showErrorMessage(res.msg)
- }
- })
- },
- //获取数据
- getDatas: function () {
- var vm = this
- var params = {
- diseaseType:vm.scListItem?'3': vm.type, //疾病类型
- dealType: vm.status, //处理方式(全部为空 1已预约 2已跟踪 3已接诊4待处理)
- patientName: vm.name, //搜索居民的姓名
- isDanger: vm.isDanger, //是否高危预警(0否 1是)
- pageNo: vm.currentPage,
- pageSize: vm.pagesize,
- templateCode: vm.scListItem?'6bcd306aaafb4e4381071346d86fadbb1': vm.selectedNewDropdown,
- startDate:vm.value1[0],
- endDate:vm.value1[1],
- patient:vm.scListItem?vm.scListItem.patientCode:"",
- onlyPatient:vm.scListItem? '1':''
- }
- jbscAPI.getResultList(params).then(function (res) {
- if (res.status == 200) {
- vm.wujilu = false
- vm.total = res.data.num
- vm.pagetotal = Math.ceil(res.data.num / vm.pagesize)
- vm.tablelist = res.data.data
- if (vm.tablelist.length == 0) {
- vm.wujilu = true
- }
- } else {
- showErrorMessage(res.msg)
- }
- })
- },
- getList:function() {
- var vm = this
- var params = {
- doctor: vm.docInfo.code, //专科医生code
- diseaseType: vm.type, //疾病类型
- type: vm.status, //处理方式(全部为空 1已预约 2已跟踪 3已接诊4待处理)
- patientName: vm.name, //搜索居民的姓名
- isDanger: vm.isDanger, //是否高危预警(''否 1是 0日常健康管理)
- pageNo: vm.currentPage,
- pageSize: vm.pagesize
- }
- jbscAPI.getList(params).then(function (res) {
- if (res.status == 200) {
- vm.wujilu = false
- vm.total = res.total?res.total:'0'
- vm.pagetotal = Math.ceil(res.total / vm.pagesize)
- vm.tablelist = res.data
- if (vm.tablelist.length == 0) {
- vm.wujilu = true
- }
- } else {
- showErrorMessage(res.msg)
- }
- })
- },
- getDraopDown:function(diseaseType){
- var vm=this
- console.log(diseaseType,'asdddddddddddd')
- jbscAPI.getScreenList({pageNo:1,pageSize:1000,labelType:'5',title:'',diseaseType:diseaseType}).then(function (res) {
- if (res.status == 200) {
- vm.newDropdownItems = _.map(res.data, function (v) {
- return {
- code: v.code,
- name: v.title
- }
-
- }
- )
- if(vm.newDropdownItems.length>1){
- vm.newDropdownItems=[
- {
- code: 'all',
- name: '全部'
- }
- ].concat(vm.newDropdownItems)
- }
- }})
- },
- exportScreenResultList:function(){
- var vm=this
- if(vm.selectedNewDropdown==''||vm.selectedNewDropdown=='all'){
- showErrorMessage('请选中筛查表单!')
- return false
- }
- jbscAPI.exportScreenResultList({
- diseaseType: vm.type, //疾病类型
- dealType: vm.status? vm.status:'', //处理方式(全部为空 1已预约 2已跟踪 3已接诊4待处理)
- patientName: vm.name, //搜索居民的姓名
- isDanger: vm.isDanger, //是否高危预警(0否 1是)
- pageNo: vm.currentPage,
- pageSize: vm.pagesize,
- templateCode:vm.selectedNewDropdown,
- startDate:vm.value1[0]?vm.value1[0]:'',
- endDate:vm.value1[1]?vm.value1[1]:''
- },'筛查表单.xls')
- },
- gettypes: function () {
- var vm = this
- var search = true
- $('#Status').bsSuggest({
- data: {
- value: [
- {
- code: '',
- name: '全部'
- },
- {
- code: '1',
- name: '已预约'
- },
- {
- code: '2',
- name: '已跟踪'
- },
- {
- code: '3',
- name: '已接诊'
- },
- {
- code: '4',
- name: '待处理'
- },
- {
- code: '5',
- name: '日常健康管理'
- },
- {
- code: '6',
- name: '已管理'
- },
- {
- code: '7',
- name: '住院补筛'
- }
- ]
- },
- getDataMethod: 'data',
- effectiveFields: ['name'],
- idField: 'code',
- keyField: 'name'
- })
- jbscAPI.getSpecialDisease().then(function (res) {
- if (res.status == 200) {
- var data = {}
- data.value = _.map(res.data, function (v) {
- return {
- code: v.code,
- name: v.name
- }
- })
- if (search) {
- data.value = [
- {
- code: '',
- name: '全部'
- }
- ].concat(data.value)
- }
- $('#Type').bsSuggest({
- data: data,
- getDataMethod: 'data',
- effectiveFields: ['name'],
- idField: 'code',
- keyField: 'name',
- }).on('onSetSelectValue', function (e, selectedData, selectedRawData) {
- vm.getDraopDown(selectedData.id)
- vm.selectedNewDropdown=''
- console.log('onSetSelectValue: ', e.target.value, selectedData, selectedRawData);
- })
- vm.types = res.data
- } else {
- showErrorMessage(res.msg)
- }
- })
- },
- gettable: function (type) {
- var vm = this
- if (type == '1') {
- if (vm.status == '') {
- $('#Status').attr({
- 'data-id': '',
- 'value': '全部'
- })
- $('#Status').val('全部')
- }
- } else {
- if (vm.status != '') {
- vm.status = ''
- $('#Status').attr({
- 'data-id': '',
- 'value': '全部'
- })
- $('#Status').val('全部')
- }
- }
- vm.isDanger = type
- vm.search(1)
- },
- //页面跳转
- search: function (page) {
- var vm = this
- vm.type = $('#Type').attr('data-id')
- var status = $('#Status').attr('data-id')
- if (status == '5') {
- vm.status = ''
- vm.isDanger = '0'
- } else if (status == '' || status == undefined) {
- if (vm.isDanger == '0') {
- vm.isDanger = ''
- }
- vm.status = status
- } else {
- vm.isDanger = '1'
- vm.status = status
- }
- vm.currentPage = page
- if(vm.docInfo.level == '1') {
- vm.getList()
- }else{
- vm.getDatas()
- }
- },
- //转诊
- zhuanzhen: function (data) {
- console.log(data,"ssss")
- // showInfoMessage('PC上暂不支持,请打开手机端疑似高危记录进行转诊预约!')
- // top.layer.msg('PC上暂不支持,请打开手机端疑似高危记录进行转诊预约', { icon: 5 })
- // 如果是康复复诊过去预约挂号,在就诊信息页面少一个字段显示,1隐藏字段,0正常显示
- sessionStorage.setItem("isFuzhen",0)
-
- top.layer.open({
- type: 2,
- closeBtn: 1, // 显示关闭按钮
- area: ['800px', '90%'],
- title: '预约挂号',
- content: '../../jbsc/html/appointment/appoint-select.html?patient=' + data.patientCode + '&surveyCode='+data.code
- })
- },
- //健康教育
- jkjy: function (data) {
- // sessionStorage.setItem("jbsc-jkwzreceiver", JSON.stringify(receiver))
- // sessionStorage.setItem("jbsc-jkroler", 1)
- layer.open({
- type: 2,
- // offset: ['100px'], //右下角弹出
- area: ['80%', '648px'],
- shade: 0.5,
- title: '健康教育',
- fixed: true, //不固定
- maxmin: true,
- closeBtn: 1,
- shift: 5,
- shadeClose: false, //点击遮罩关闭层
- content: '../../article/html/article.html?code=' + data.patientCode + '&resultCode=' + data.code
- })
- // location.href="../../../../health-education/login.html?origin=jbsc"
- },
- //健康指导
- jkzd: function (data) {
- // sessionStorage.setItem("jbsc-jkwzreceiver", JSON.stringify(receiver))
- // sessionStorage.setItem("jbsc-jkroler", 1)
- layer.open({
- type: 2,
- // offset: ['100px'], //右下角弹出
- area: ['80%', '648px'],
- shade: 0.5,
- title: '健康指导',
- fixed: true, //不固定
- maxmin: true,
- closeBtn: 1,
- shift: 5,
- shadeClose: false, //点击遮罩关闭层
- content: '../../guidance/html/index.html?patient=' + data.patientCode + '&resultCode=' + data.code
- })
- // location.href="../../../../health-education/login.html?origin=jbsc"
- },
- view: function (data) {
- var vm = this
- layer.open({
- type: 2,
- // offset: ['100px'], //右下角弹出
- area: ['568px', '100%'],
- shade: 0.5,
- title: '查看筛选结果',
- fixed: true, //不固定
- maxmin: true,
- closeBtn: 1,
- shift: 5,
- shadeClose: false, //点击遮罩关闭层
- content: '../../jbsc/html/view_screening_results.html?isView=true&resultCode=' + data.code,
- end:function() {
- vm.tablelist = []
- if(vm.docInfo.level == '1') {
- vm.getList()
- }else{
- vm.getDatas()
- }
- vm.getModal()
- },
- })
- },
- //筛查
- shaicha: function (data, isNew) {
- var vm = this
- if (isNew) {
- //再次筛查数+1
- layer.open({
- type: 2,
- area: ['820px', '648px'],
- shade: 0.5,
- id: 'questionnaire',
- title: '筛选统计',
- fixed: true, //不固定
- maxmin: true,
- closeBtn: 1,
- shift: 5,
- shadeClose: false, //点击遮罩关闭层
- content:
- '../../jbsc/html/questionnaire.html?fliter_code=' +
- data.templateCode +
- '&fliter_title=' +
- data.templateTitle +
- '&resident_code=' +
- data.patientCode +
- '&resident_name=' +
- data.patientName
- })
- return
- }
- layer.open({
- type: 2,
- offset: 'rb', //右下角弹出
- id: 'filter_type',
- area: ['280px', '100%'],
- shade: 0.5,
- title: false,
- fixed: true, //不固定
- maxmin: false,
- closeBtn: 0,
- shift: 5,
- shadeClose: true, //点击遮罩关闭层
- content: '../../jbsc/html/filter_type.html'
- })
- },
- //健康跟踪
- jkgz: function (data) {
- var vm = this
- //跳转到筛查结果页面
- var index = layer.open({
- type: 2,
- area: ['500px', '550px'],
- shade: 0.5,
- title: '家医建议',
- fixed: true, //不固定
- maxmin: false,
- closeBtn: 1,
- shift: 5,
- shadeClose: false, //点击遮罩关闭层
- content: '../../jbsc/html/advice.html?resultCode=' + data.code + '&filter_code=' + data.templateCode
- })
- console.log(index)
- },
- datamodeltap: function () {
- var vm = this
- $('#sc_datamodel').toggle('normal', function () {
- if (vm.datamodelshow) {
- vm.datamodelshow = false
- $('#datamodeltap').removeClass('up_datamodel').addClass('down_datamodel')
- $('#datamodeltap span').text('展开')
- } else {
- vm.datamodelshow = true
- $('#datamodeltap').removeClass('down_datamodel').addClass('up_datamodel')
- $('#datamodeltap span').text('收起')
- }
- })
- },
- sqsf: function (item) {
- var vm = this
- vm.surveyResultCode = item.code
- vm.centerDialogVisible = true
- }
- }
- })
|