You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
154 lines
3.1 KiB
154 lines
3.1 KiB
const app = getApp<IAppOption>(); |
|
|
|
// pages/story/a.ts |
|
Component({ |
|
/** |
|
* 组件的属性列表 |
|
*/ |
|
properties: { |
|
userInfo: Object, |
|
DoctorTitleType: Object, |
|
hospitalClassification: Object, |
|
hospitalLevel: Object, |
|
}, |
|
|
|
/** |
|
* 组件的初始数据 |
|
*/ |
|
data: { |
|
fold1: false, |
|
foldHeight1: 10000, |
|
take: {}, |
|
case: {}, |
|
cooperateList: [], |
|
|
|
guide: 0, |
|
guideShow: false, |
|
guideList: ["2-1", "2-2", "2-3"], |
|
}, |
|
|
|
lifetimes: { |
|
attached() { |
|
this.getTake(); |
|
this.getCase(); |
|
this.getCooperate(); |
|
}, |
|
}, |
|
/** |
|
* 组件的方法列表 |
|
*/ |
|
methods: { |
|
getHeight() { |
|
const query = wx.createSelectorQuery().in(this); |
|
query.select("#fold1").boundingClientRect(); |
|
query.exec((res) => { |
|
this.setData({ |
|
foldHeight1: res[0].height, |
|
}); |
|
}); |
|
}, |
|
toggleFold1() { |
|
this.setData({ |
|
fold1: !this.data.fold1, |
|
}); |
|
}, |
|
handleEntryCase() { |
|
wx.navigateTo({ |
|
url: "/module1/pages/entryCases/index", |
|
}); |
|
}, |
|
getTake() { |
|
wx.ajax({ |
|
method: "GET", |
|
url: "?r=takeda/doctor/todo", |
|
data: {}, |
|
}).then((res) => { |
|
this.setData({ |
|
take: res, |
|
}); |
|
}); |
|
}, |
|
getCase() { |
|
wx.ajax({ |
|
method: "GET", |
|
url: "?r=takeda/doctor/case", |
|
data: {}, |
|
}).then((res) => { |
|
this.setData({ |
|
case: res, |
|
}); |
|
}); |
|
}, |
|
getCooperate() { |
|
wx.ajax({ |
|
method: "GET", |
|
url: "?r=takeda/doctor/cooperation-doctor-list", |
|
data: {}, |
|
}).then((res) => { |
|
this.setData({ |
|
cooperateList: res.list, |
|
}); |
|
this.getHeight(); |
|
}); |
|
}, |
|
handleCaseUpdate() { |
|
app.globalData.newFeedback = "1"; |
|
wx.switchTab({ |
|
url: "/pages/cases/index", |
|
}); |
|
}, |
|
handleChat() { |
|
wx.switchTab({ |
|
url: "/pages/chatRoomList/index", |
|
}); |
|
}, |
|
handleQuestion(e) { |
|
const { index } = e.currentTarget.dataset; |
|
this.triggerEvent("question", index); |
|
}, |
|
handleCase(e) { |
|
const { type } = e.currentTarget.dataset; |
|
const name = { |
|
0: "全部", |
|
2: "新病历", |
|
3: "讨论中", |
|
4: "已归档", |
|
}[type]; |
|
app.globalData.caseStatus = type === "0" ? "" : type; |
|
app.globalData.caseStatusName = name; |
|
wx.switchTab({ |
|
url: "/pages/cases/index", |
|
}); |
|
}, |
|
handleCooperateDetail(e) { |
|
const { index } = e.currentTarget.dataset; |
|
this.selectComponent(`#cooperate${index}`).handleDetail(); |
|
}, |
|
handleApplication() { |
|
wx.navigateTo({ |
|
url: "/module1/pages/applicationRecords/index", |
|
}); |
|
}, |
|
handleApplicationDoctor() { |
|
wx.navigateTo({ |
|
url: "/module1/pages/setApplicationDoctor/index", |
|
}); |
|
}, |
|
|
|
touchmovePreview() { |
|
return false; |
|
}, |
|
handleTapPreview() { |
|
if (this.data.guide == this.data.guideList.length - 1) { |
|
this.setData({ |
|
guideShow: false, |
|
}); |
|
} |
|
this.setData({ |
|
guide: Number(this.data.guide) + 1, |
|
}); |
|
}, |
|
}, |
|
}); |
|
|
|
export {};
|
|
|