diff --git a/components/form-template/form-cell/index.vue b/components/form-template/form-cell/index.vue
index 2ea879d..ce3df65 100644
--- a/components/form-template/form-cell/index.vue
+++ b/components/form-template/form-cell/index.vue
@@ -2,20 +2,20 @@
-
+
-
-
-
+
+
+
-
+
@@ -33,7 +33,7 @@ const props = defineProps({
}
})
-const formCellType = ['input', 'select', 'date', 'radio', 'region', 'textarea', 'multiSelectAndOther', 'selectAndOther', 'selfMultipleDiseases', 'files', 'diagnosis', 'positiveFind', 'evaluatedJoint', 'exerciseLevel'];
+const formCellType = ['input', 'select', 'date', 'radio', 'region', 'textarea', 'multiSelectAndOther', 'selectAndOther', 'selfMultipleDiseases', 'files', 'diagnosis', 'positiveFind', 'evaluatedJoint', 'exerciseLevel', 'hisCardNo'];
const formCellTitle = ['surgicalHistory'];
const customCellType = ['BMI', 'bloodPressure'];
const disabledMap = computed(() => props.disableTitles.reduce((m, i) => {
diff --git a/pages/archive/step-edit-archive.vue b/pages/archive/step-edit-archive.vue
index b713c3b..672f192 100644
--- a/pages/archive/step-edit-archive.vue
+++ b/pages/archive/step-edit-archive.vue
@@ -30,7 +30,7 @@ import dayjs from 'dayjs';
import useGuard from '@/hooks/useGuard';
import useAccount from '@/store/account';
import api from '@/utils/api';
-import { toast, confirm as uniConfirm } from '@/utils/widget';
+import { toast, confirm as uniConfirm, loading as waiting, hideLoading } from '@/utils/widget';
import validate from '@/utils/validate';
import { set } from "@/utils/cache";
@@ -131,7 +131,7 @@ function change({ title, value }) {
async function queryHisArchives() {
if (queryingHisArchives.value) return;
-
+ waiting()
const matchedPlans = archiveQueryPlans.value.filter(isQueryPlanSatisfied);
if (!matchedPlans.length) {
hisArchive.value = null;
@@ -185,6 +185,7 @@ async function queryHisArchives() {
// 选择“修改信息”时留在当前步骤继续填写。
}
} finally {
+ hideLoading()
queryingHisArchives.value = false;
}
}
@@ -454,7 +455,7 @@ async function getArchives() {
}
async function getBaseForm() {
- const res = await api('getTeamBaseInfo', { corpId: corpId.value, teamId: teamId.value });
+ const res = await api('getTeamBaseInfo', { corpId: corpId.value, teamId: teamId.value, queryHisTitles: queryHisTitles.value });
if (res && res.success) {
teamFormItems.value = Array.isArray(res.data) ? res.data : [];
// const mobileIndex = formItems.value.findIndex(item => item.title === 'mobile');
diff --git a/pages/home/customer-archive.vue b/pages/home/customer-archive.vue
index 437759e..ce64909 100644
--- a/pages/home/customer-archive.vue
+++ b/pages/home/customer-archive.vue
@@ -222,10 +222,12 @@ async function auth() {
async function getCustomers() {
if (loading) return;
- loading = true
+ loading = true;
+ await getExternalUserId(props.corpId)
const res = await api("getMiniAppCustomers", {
miniAppId: account.value.openid,
corpId: props.corpId,
+ externalUserId: externalUserId.value
}, false);
if (res && res.success) {
customers.value = res && Array.isArray(res.data) ? res.data : [];
diff --git a/store/account.js b/store/account.js
index 2ea450a..4167221 100644
--- a/store/account.js
+++ b/store/account.js
@@ -14,6 +14,7 @@ export default defineStore("accountStore", () => {
const isIMInitialized = ref(false);
const openid = ref("");
const externalUserId = ref('');
+ const externalUserIdMap = ref({});
const teams = ref([]);
const hasImCorpId = computed(() => {
// 正式环境IM账号优先 暂时只有wpLgjyawAA8N0gWmXgyJq8wpjGcOT7fg机构的才开启IM账号
@@ -159,14 +160,21 @@ export default defineStore("accountStore", () => {
const normalizedCorpId = normalizeCorpId(corpId);
const unionid = account.value?.unionid;
const openid = account.value?.openid;
- const miniAppId = account.value?.openid;
+ const miniAppId = account.value?.openid;
if (!(normalizedCorpId && unionid && openid)) {
externalUserId.value = '';
return
};
+ const key = `${normalizedCorpId}_${unionid}_${openid}_${miniAppId}`;
+ if (externalUserIdMap.value[key]) {
+ return externalUserIdMap.value[key]
+ }
const res = await api('getUnionidToExternalUserid', { unionid, openid, corpId: normalizedCorpId, miniAppId }, false);
const id = res && res.success && typeof res.data === 'string' && res.data.trim() ? res.data.trim() : '';
externalUserId.value = id;
+ if (id) {
+ externalUserIdMap.value[key] = id;
+ }
return id;
}