fix:问题修复
This commit is contained in:
parent
1f7812e8f1
commit
482d20e0fc
@ -2,20 +2,20 @@
|
||||
<!-- <view class="text-danger px-10">{{ attrs.name }} {{ attrs.title }} {{ attrs.type }}</view> -->
|
||||
<form-datepicker v-if="attrs.type === 'date'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
||||
@change="change" />
|
||||
<form-input v-else-if="attrs.type === 'input'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
||||
@change="change" />
|
||||
<form-input v-else-if="attrs.type === 'input' || attrs.type === 'hisCardNo'" v-bind="attrs" :form="form"
|
||||
:disableChange="disableChange" @change="change" />
|
||||
<form-radio v-else-if="attrs.type === 'radio'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
||||
@change="change" />
|
||||
<form-region v-else-if="attrs.type === 'region'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
||||
@change="change" />
|
||||
<form-select v-else-if="attrs.type === 'select'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
||||
@change="change" />
|
||||
<form-evaluated-joint v-else-if="attrs.type === 'evaluatedJoint'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
||||
@change="change" />
|
||||
<form-exercise-level v-else-if="attrs.type === 'exerciseLevel'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
||||
@change="change" />
|
||||
<form-select-and-other v-else-if="attrs.type === 'selectAndOther'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
||||
@change="change" />
|
||||
<form-evaluated-joint v-else-if="attrs.type === 'evaluatedJoint'" v-bind="attrs" :form="form"
|
||||
:disableChange="disableChange" @change="change" />
|
||||
<form-exercise-level v-else-if="attrs.type === 'exerciseLevel'" v-bind="attrs" :form="form"
|
||||
:disableChange="disableChange" @change="change" />
|
||||
<form-select-and-other v-else-if="attrs.type === 'selectAndOther'" v-bind="attrs" :form="form"
|
||||
:disableChange="disableChange" @change="change" />
|
||||
<form-textarea v-else-if="attrs.type === 'textarea'" v-bind="attrs" :form="form" :disableChange="disableChange"
|
||||
@change="change" />
|
||||
<form-mult-disease v-else-if="attrs.type === 'selfMultipleDiseases'" v-bind="attrs" :form="form" @change="change"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<template v-for="item in formItems" :key="item.title">
|
||||
<form-cell v-if="item.cellType === 'formCellItem'" v-bind="item" :form="form"
|
||||
:disableChange="isDisableChange(item)" @change="change" @addRule="addRule" />
|
||||
<form-cell v-if="item.cellType === 'formCellItem'" v-bind="item" :form="form" :disableChange="isDisableChange(item)"
|
||||
@change="change" @addRule="addRule" />
|
||||
</template>
|
||||
<form-cell />
|
||||
</template>
|
||||
@ -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) => {
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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 : [];
|
||||
|
||||
@ -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账号
|
||||
@ -164,9 +165,16 @@ export default defineStore("accountStore", () => {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user