|
|
|
const app = getApp<IAppOption>();
|
|
|
|
|
|
|
|
// pages/story/a.ts
|
|
|
|
Component({
|
|
|
|
/**
|
|
|
|
* 组件的属性列表
|
|
|
|
*/
|
|
|
|
properties: {
|
|
|
|
userInfo: Object,
|
|
|
|
DoctorTitleType: Object,
|
|
|
|
hospitalClassification: Object,
|
|
|
|
hospitalLevel: Object,
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 组件的初始数据
|
|
|
|
*/
|
|
|
|
data: {
|
|
|
|
fold1: false,
|
|
|
|
foldHeight1: 10000,
|
|
|
|
fold2: false,
|
|
|
|
foldHeight2: 10000,
|
|
|
|
take: {},
|
|
|
|
case: {} as any,
|
|
|
|
cooperateList: [],
|
|
|
|
inviteList: [],
|
|
|
|
},
|
|
|
|
|
|
|
|
lifetimes: {
|
|
|
|
attached() {
|
|
|
|
this.getTake();
|
|
|
|
this.getCase();
|
|
|
|
this.getCooperate();
|
|
|
|
this.getInvite();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* 组件的方法列表
|
|
|
|
*/
|
|
|
|
methods: {
|
|
|
|
getHeight1() {
|
|
|
|
const query = wx.createSelectorQuery().in(this);
|
|
|
|
query.select("#fold1").boundingClientRect();
|
|
|
|
query.exec((res) => {
|
|
|
|
this.setData({
|
|
|
|
foldHeight1: res[0].height,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
getHeight2() {
|
|
|
|
const query = wx.createSelectorQuery().in(this);
|
|
|
|
query.select("#fold2").boundingClientRect();
|
|
|
|
query.exec((res) => {
|
|
|
|
this.setData({
|
|
|
|
foldHeight2: res[0].height,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
toggleFold1() {
|
|
|
|
this.setData({
|
|
|
|
fold1: !this.data.fold1,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
toggleFold2() {
|
|
|
|
this.setData({
|
|
|
|
fold2: !this.data.fold2,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
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.getHeight1();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
getInvite() {
|
|
|
|
wx.ajax({
|
|
|
|
method: "GET",
|
|
|
|
url: "?r=takeda/doctor/invite-doctor-list",
|
|
|
|
data: {},
|
|
|
|
}).then((res) => {
|
|
|
|
this.setData({
|
|
|
|
inviteList: res.list,
|
|
|
|
});
|
|
|
|
this.getHeight2();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
handleInvite() {
|
|
|
|
wx.navigateTo({
|
|
|
|
url: "/module1/pages/invite/index",
|
|
|
|
});
|
|
|
|
},
|
|
|
|
handleEntryCase() {
|
|
|
|
wx.navigateTo({
|
|
|
|
url: "/module1/pages/entryCases/index",
|
|
|
|
});
|
|
|
|
},
|
|
|
|
handlePendCase() {
|
|
|
|
app.globalData.needDeal = "1";
|
|
|
|
wx.switchTab({
|
|
|
|
url: "/pages/cases/index",
|
|
|
|
});
|
|
|
|
},
|
|
|
|
handleCaseUpdate() {
|
|
|
|
wx.switchTab({
|
|
|
|
url: "/pages/cases/index",
|
|
|
|
});
|
|
|
|
},
|
|
|
|
handleChat() {
|
|
|
|
wx.switchTab({
|
|
|
|
url: "/pages/chatRoomList/index",
|
|
|
|
});
|
|
|
|
},
|
|
|
|
handleAudit() {
|
|
|
|
wx.navigateTo({
|
|
|
|
url: "/module1/pages/auditDoctorList/index",
|
|
|
|
});
|
|
|
|
},
|
|
|
|
handleQuestion(e) {
|
|
|
|
const { index } = e.currentTarget.dataset;
|
|
|
|
this.triggerEvent("question", index);
|
|
|
|
},
|
|
|
|
handleNewCase() {
|
|
|
|
const { case: cases } = this.data;
|
|
|
|
wx.showModal({
|
|
|
|
confirmColor: "#00B4C5",
|
|
|
|
cancelColor: "#141515",
|
|
|
|
showCancel: false,
|
|
|
|
confirmText: "关闭",
|
|
|
|
content: `本人提交:${cases.newOneCaseCount}\r\n他人提交:${cases.newTwoCaseCount}`,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export {};
|