武田小程序
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.

127 lines
2.5 KiB

const app = getApp<IAppOption>();
8 months ago
// pages/story/a.ts
Component({
/**
*
*/
properties: {
userInfo: Object,
DoctorTitleType: Object,
7 months ago
hospitalClassification: Object,
hospitalLevel: Object,
},
8 months ago
/**
*
*/
data: {
fold1: false,
foldHeight1: 10000,
take: {},
7 months ago
case: {},
cooperateList: [],
8 months ago
},
lifetimes: {
attached() {
this.getTake();
this.getCase();
7 months ago
this.getCooperate();
},
},
8 months ago
/**
*
*/
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,
});
},
7 months ago
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,
});
});
},
7 months ago
getCooperate() {
wx.ajax({
method: "GET",
url: "?r=takeda/doctor/cooperation-doctor-list",
data: {},
}).then((res) => {
this.setData({
cooperateList: res.list,
});
this.getHeight();
});
},
7 months ago
handleCaseUpdate() {
app.globalData.newFeedback = "1";
7 months ago
wx.switchTab({
url: "/pages/cases/index",
});
},
handleChat() {
wx.switchTab({
url: "/pages/chatRoomList/index",
});
},
7 months ago
handleQuestion(e) {
const { index } = e.currentTarget.dataset;
7 months ago
this.triggerEvent("question", index);
7 months ago
},
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();
},
},
});
7 months ago
export {};