|
@@ -1,5 +1,6 @@
|
|
|
import HTTP from '@/request/alova';
|
|
import HTTP from '@/request/alova';
|
|
|
import { fromAnalysisModel, type PulseAnalysisModel } from '@/request/model';
|
|
import { fromAnalysisModel, type PulseAnalysisModel } from '@/request/model';
|
|
|
|
|
+import { getNetworkWall } from '@/platform';
|
|
|
|
|
|
|
|
const getSummary = (value?: string[]) => (Array.isArray(value) && value.length ? value : void 0);
|
|
const getSummary = (value?: string[]) => (Array.isArray(value) && value.length ? value : void 0);
|
|
|
|
|
|
|
@@ -11,7 +12,8 @@ export function putPulseMethod(patientId: string, result: PulseAnalysisModel) {
|
|
|
[];
|
|
[];
|
|
|
const data = Object.assign(result, { patientId, results: summary.join(',') });
|
|
const data = Object.assign(result, { patientId, results: summary.join(',') });
|
|
|
return HTTP.Post<PulseAnalysisModel, any>(`/fdhb-tablet/analysisManage/savePulseAnalysisReport`, data, {
|
|
return HTTP.Post<PulseAnalysisModel, any>(`/fdhb-tablet/analysisManage/savePulseAnalysisReport`, data, {
|
|
|
- transform() {
|
|
|
|
|
|
|
+ async transform() {
|
|
|
|
|
+ const network = await getNetworkWall();
|
|
|
return {
|
|
return {
|
|
|
measureId: data.measureId,
|
|
measureId: data.measureId,
|
|
|
hand: [
|
|
hand: [
|
|
@@ -21,7 +23,7 @@ export function putPulseMethod(patientId: string, result: PulseAnalysisModel) {
|
|
|
summaryValue: data.summaryValue,
|
|
summaryValue: data.summaryValue,
|
|
|
summaryLabel: data.summaryLabel,
|
|
summaryLabel: data.summaryLabel,
|
|
|
results: data.results,
|
|
results: data.results,
|
|
|
- url: __FORBID_AUTO_PROCESS_PULSE_AGENCY__ ? void 0 : data.url,
|
|
|
|
|
|
|
+ url: network === 'interior' ? (console.info('log: 判定内网环境 舍弃脉诊报告 url'),void 0) : data.url,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
@@ -42,18 +44,16 @@ export function getPulseMethod(id: string) {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/**
|
|
|
|
|
- * 暂未实现
|
|
|
|
|
- * @deprecated
|
|
|
|
|
- */
|
|
|
|
|
export function getPulseAgentMethod() {
|
|
export function getPulseAgentMethod() {
|
|
|
return HTTP.Post(
|
|
return HTTP.Post(
|
|
|
- `/fdhb-tablet/warrantManage/getPageSets`,
|
|
|
|
|
|
|
+ `/fdhb-tablet/analysisManage/getPulseSupport`,
|
|
|
{},
|
|
{},
|
|
|
{
|
|
{
|
|
|
transform(data: any) {
|
|
transform(data: any) {
|
|
|
- if (data?.origin == null && data?.url == null) return void 0;
|
|
|
|
|
- const origin = data.origin.endsWith('/report.html') ? data.origin : `${data.origin}/taiyi/report.html`;
|
|
|
|
|
|
|
+ const url = data?.origin ?? data?.url;
|
|
|
|
|
+ if (!url) return void 0;
|
|
|
|
|
+
|
|
|
|
|
+ const origin = url.endsWith('/report.html') ? url : `${url}/taiyi/report.html`;
|
|
|
return {
|
|
return {
|
|
|
appId: data.appId ?? 'hJn5D3rr',
|
|
appId: data.appId ?? 'hJn5D3rr',
|
|
|
token: data.token,
|
|
token: data.token,
|