|
@@ -51,6 +51,7 @@ Page({
|
|
|
pageHeight: "100vh", // 默认值
|
|
pageHeight: "100vh", // 默认值
|
|
|
popupList: [] as AnyArray,
|
|
popupList: [] as AnyArray,
|
|
|
isShowPopup: false,
|
|
isShowPopup: false,
|
|
|
|
|
+ isCompleting: false, // 防止重复点击标志
|
|
|
patients: [] as (App.Patient.Model & { isDefault: "Y" | "N" })[],
|
|
patients: [] as (App.Patient.Model & { isDefault: "Y" | "N" })[],
|
|
|
patient: null as App.Patient.Model | null,
|
|
patient: null as App.Patient.Model | null,
|
|
|
patientDescription: "",
|
|
patientDescription: "",
|
|
@@ -313,22 +314,22 @@ Page({
|
|
|
},
|
|
},
|
|
|
getNotDealList() {
|
|
getNotDealList() {
|
|
|
getNotDealLists().then((res) => {
|
|
getNotDealLists().then((res) => {
|
|
|
|
|
+ console.log(res, "res===获取通知列表");
|
|
|
if (res.length > 0) {
|
|
if (res.length > 0) {
|
|
|
this.setData({
|
|
this.setData({
|
|
|
popupList: res,
|
|
popupList: res,
|
|
|
|
|
+ isShowPopup: true,
|
|
|
});
|
|
});
|
|
|
|
|
+ }else{
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- isShowPopup: true,
|
|
|
|
|
|
|
+ popupList: [],
|
|
|
|
|
+ isShowPopup: false,
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
showFollowPopup() {
|
|
showFollowPopup() {
|
|
|
- if (this.data.popupList.length > 0) {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- isShowPopup: true,
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.getNotDealList();
|
|
|
},
|
|
},
|
|
|
onVisibleChange(e: { detail: { visible: any } }) {
|
|
onVisibleChange(e: { detail: { visible: any } }) {
|
|
|
this.setData({
|
|
this.setData({
|
|
@@ -339,40 +340,54 @@ Page({
|
|
|
async goComplete(e: {
|
|
async goComplete(e: {
|
|
|
currentTarget: { dataset: { page: string; id: number; title: string } };
|
|
currentTarget: { dataset: { page: string; id: number; title: string } };
|
|
|
}) {
|
|
}) {
|
|
|
- const { title } = e.currentTarget.dataset;
|
|
|
|
|
- let page = e.currentTarget.dataset.page;
|
|
|
|
|
- let id = e.currentTarget.dataset.id;
|
|
|
|
|
- if (page === "/module/chats/pages/index/index") {
|
|
|
|
|
- if (title === "健康评估") {
|
|
|
|
|
- wx.setStorageSync("isAnalysis", 4);
|
|
|
|
|
- toChats("questionnaire", 2);
|
|
|
|
|
|
|
+ // 防止重复点击
|
|
|
|
|
+ if (this.data.isCompleting) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.setData({ isCompleting: true });
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ const { title } = e.currentTarget.dataset;
|
|
|
|
|
+ let page = e.currentTarget.dataset.page;
|
|
|
|
|
+ let id = e.currentTarget.dataset.id;
|
|
|
|
|
+ if (page === "/module/chats/pages/index/index") {
|
|
|
|
|
+ if (title === "健康评估") {
|
|
|
|
|
+ wx.setStorageSync("isAnalysis", 4);
|
|
|
|
|
+ toChats("questionnaire", 2);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ wx.setStorageSync("isAnalysis", 2);
|
|
|
|
|
+ wx.setStorageSync("workId", id);
|
|
|
|
|
+ wx.navigateTo({
|
|
|
|
|
+ url: `${page}?component=questionnaire&messageType=1&id=${id}`,
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (page === "/module/article/pages/science-info/science-info") {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await Get(`/psarticle/clickPsaNotice`, {
|
|
|
|
|
+ params: { noticeSendRecordId: id },
|
|
|
|
|
+ });
|
|
|
|
|
+ const url = res?.data;
|
|
|
|
|
+ const item = {
|
|
|
|
|
+ url,
|
|
|
|
|
+ };
|
|
|
|
|
+ wx.navigateTo({
|
|
|
|
|
+ url: `${page}`,
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ res.eventChannel.emit("load", item);
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.log(error);
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
- wx.setStorageSync("isAnalysis", 2);
|
|
|
|
|
- wx.setStorageSync("workId", id);
|
|
|
|
|
- wx.navigateTo({
|
|
|
|
|
- url: `${page}?component=questionnaire&messageType=1&id=${id}`,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // 随访
|
|
|
|
|
+ wx.redirectTo({ url: `${page}?id=${id}` });
|
|
|
}
|
|
}
|
|
|
- } else if (page === "/module/article/pages/science-info/science-info") {
|
|
|
|
|
- try {
|
|
|
|
|
- const res = await Get(`/psarticle/clickPsaNotice`, {
|
|
|
|
|
- params: { noticeSendRecordId: id },
|
|
|
|
|
- });
|
|
|
|
|
- const url = res?.data;
|
|
|
|
|
- const item = {
|
|
|
|
|
- url,
|
|
|
|
|
- };
|
|
|
|
|
- wx.navigateTo({
|
|
|
|
|
- url: `${page}`,
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
- res.eventChannel.emit("load", item);
|
|
|
|
|
- });
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
- console.log(error);
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- // 随访
|
|
|
|
|
- wx.redirectTo({ url: `${page}?id=${id}` });
|
|
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ // 延迟重置标志,防止快速连续点击
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.setData({ isCompleting: false });
|
|
|
|
|
+ }, 500);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 随访评估报告已出
|
|
// 随访评估报告已出
|