update: 修改大屏假数据后台管理
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
<div class="title">咨询档案</div>
|
||||
<BasicForm @register="registerForm">
|
||||
<template #record="{ model, field }">
|
||||
<div v-if="showReport">
|
||||
<!-- <div v-if="showReport">-->
|
||||
<div v-if="false">
|
||||
{{ model[field] }}
|
||||
<a-button type="text" style="color: #1890ff" @click="viewReportB(model)">查看</a-button>
|
||||
</div>
|
||||
@@ -84,7 +85,7 @@
|
||||
try {
|
||||
const res = await getMedicalRecordApi({ id: medicalRecordsId });
|
||||
userId.value = res?.userId;
|
||||
getEnvInfo().VITE_PLATFORM !== 'QH' && checkHaveReport(res?.userId, res?.user?.familyRelation_dictText);
|
||||
// getEnvInfo().VITE_PLATFORM !== 'QH' && checkHaveReport(res?.userId, res?.user?.familyRelation_dictText);
|
||||
idCard.value = res?.user?.idCard;
|
||||
await setBasicInfoFieldsValue({
|
||||
...res?.user,
|
||||
|
||||
@@ -407,16 +407,16 @@ export const personalFileForm: FormSchema[] = [
|
||||
component: 'Input',
|
||||
// slot: 'desire',
|
||||
},
|
||||
{
|
||||
label: '体检报告',
|
||||
field: 'yymc',
|
||||
component: 'Input',
|
||||
slot: 'record',
|
||||
ifShow: getEnvInfo().VITE_PLATFORM !== 'QH',
|
||||
// ifShow: ({ values }) => {
|
||||
// return !!values.idCard;
|
||||
// },
|
||||
},
|
||||
// {
|
||||
// label: '体检报告',
|
||||
// field: 'yymc',
|
||||
// component: 'Input',
|
||||
// slot: 'record',
|
||||
// ifShow: getEnvInfo().VITE_PLATFORM !== 'QH',
|
||||
// // ifShow: ({ values }) => {
|
||||
// // return !!values.idCard;
|
||||
// // },
|
||||
// },
|
||||
{
|
||||
label: 'idCard隐藏字段',
|
||||
field: 'idCard',
|
||||
|
||||
@@ -14,6 +14,11 @@ enum Api {
|
||||
status = '/health-emergency/emergency/fakerData/getFakerDataEnable',
|
||||
changeStatus = '/health-emergency/emergency/fakerData/fakerDataEnable',
|
||||
xjCountFakerData = '/health-emergency/emergency/fakerData/createXjMedicalCountFakerData',
|
||||
editValue = '/health-emergency/emergency/LargeScreenNew/editValue',
|
||||
editData = '/health-emergency/emergency/LargeScreenNew/editData',
|
||||
editMedicalValue = '/health-emergency/emergency/LargeScreenNew/editMedicalValue',
|
||||
listNew = '/health-emergency/emergency/LargeScreenNew/dataDetail',
|
||||
listMedical = '/health-emergency/emergency/LargeScreenNew/medicalDataDetail',
|
||||
}
|
||||
export const listApi = (params: any) => defHttp.post({ url: Api.list, params }, { joinParamsToUrl: true, isTransformResponse: false });
|
||||
// export const saveApi = (params: any) => defHttp.post({ url: Api.save.split(',')[params['module'] - 9], params });
|
||||
@@ -25,3 +30,10 @@ export const statusApi = (params: any, id: string) => defHttp.post({ url: Api.st
|
||||
export const changeStatusApi = (params: any) => defHttp.post({ url: Api.changeStatus, params });
|
||||
|
||||
export const xjCountFakerDataApi = (params: any, id: string) => defHttp.post({ url: Api.xjCountFakerData + '?centerId=' + id, params });
|
||||
|
||||
export const editValueApi = (params: any, id: string) => defHttp.post({ url: Api.editValue + '?centerId=' + id, params });
|
||||
export const editDataApi = (params: any, id: string) => defHttp.post({ url: Api.editData + '?centerId=' + id, params });
|
||||
export const editMedicalValueApi = (params: any, id: string) => defHttp.post({ url: Api.editMedicalValue + '?centerId=' + id, params });
|
||||
|
||||
export const listNewApi = (params: any) => defHttp.get({ url: Api.listNew, params });
|
||||
export const listMedicalApi = (params: any) => defHttp.get({ url: Api.listMedical, params });
|
||||
|
||||
@@ -6,7 +6,7 @@ const serviceColumns: BasicColumn[] = [
|
||||
dataIndex: 'latestCall',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -14,7 +14,7 @@ const serviceColumns: BasicColumn[] = [
|
||||
dataIndex: 'latestAcceptCall',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -22,7 +22,7 @@ const serviceColumns: BasicColumn[] = [
|
||||
dataIndex: 'illNum',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -30,29 +30,29 @@ const serviceColumns: BasicColumn[] = [
|
||||
dataIndex: 'emergencyNum',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '累计受理',
|
||||
dataIndex: 'totalAccept',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '累计处置',
|
||||
dataIndex: 'totalDisposal',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: '累计受理',
|
||||
// dataIndex: 'totalAccept',
|
||||
// rewriting: true,
|
||||
// rewroteCell: {
|
||||
// type: 'inputNumber',
|
||||
// },
|
||||
// title: '状态',
|
||||
// dataIndex: 'status',
|
||||
// },
|
||||
// {
|
||||
// title: '累计处置',
|
||||
// dataIndex: 'totalDisposal',
|
||||
// rewriting: true,
|
||||
// rewroteCell: {
|
||||
// type: 'inputNumber',
|
||||
// },
|
||||
// },
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
},
|
||||
];
|
||||
const archiveColumns: BasicColumn[] = [
|
||||
{
|
||||
@@ -60,7 +60,7 @@ const archiveColumns: BasicColumn[] = [
|
||||
dataIndex: 'hospitalCount',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -68,13 +68,9 @@ const archiveColumns: BasicColumn[] = [
|
||||
dataIndex: 'emergencyCount',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
},
|
||||
];
|
||||
const bigColumns: BasicColumn[] = [
|
||||
{
|
||||
@@ -90,13 +86,17 @@ const bigColumns: BasicColumn[] = [
|
||||
dataIndex: 'count',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
dataIndex: 'del',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
},
|
||||
];
|
||||
const healthColumns: BasicColumn[] = [
|
||||
{
|
||||
@@ -104,7 +104,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'weightLossCountDay',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -112,7 +112,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'weightLossCountMonth',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -120,7 +120,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'weightLossAbnormalCountDay',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -128,7 +128,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'weightLossAbnormalCountMonth',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -136,7 +136,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'bloodSugarCountDay',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -144,7 +144,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'bloodSugarCountMonth',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -152,7 +152,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'bloodSugarAbnormalCountDay',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -160,7 +160,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'bloodSugarAbnormalCountMonth',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -168,7 +168,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'bloodPressureCountDay',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -176,7 +176,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'bloodPressureCountMonth',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -184,7 +184,7 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'bloodPressureAbnormalCountDay',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -192,13 +192,13 @@ const healthColumns: BasicColumn[] = [
|
||||
dataIndex: 'bloodPressureAbnormalCountMonth',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
},
|
||||
// {
|
||||
// title: '状态',
|
||||
// dataIndex: 'status',
|
||||
// },
|
||||
];
|
||||
|
||||
const hmedicalColumns: BasicColumn[] = [
|
||||
@@ -207,7 +207,7 @@ const hmedicalColumns: BasicColumn[] = [
|
||||
dataIndex: 'totalCount',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -215,7 +215,7 @@ const hmedicalColumns: BasicColumn[] = [
|
||||
dataIndex: 'cardiovaAbCount',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -223,7 +223,7 @@ const hmedicalColumns: BasicColumn[] = [
|
||||
dataIndex: 'cerebrovAbCount',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -231,12 +231,35 @@ const hmedicalColumns: BasicColumn[] = [
|
||||
dataIndex: 'cctaAbCount',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'inputNumber',
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: '状态',
|
||||
// dataIndex: 'status',
|
||||
// },
|
||||
];
|
||||
export const columns: Array<BasicColumn[]> = [serviceColumns, archiveColumns, bigColumns, healthColumns, hmedicalColumns];
|
||||
|
||||
export const columns32: BasicColumn[] = [
|
||||
{
|
||||
title: '体检机构',
|
||||
dataIndex: 'name',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
title: '人数',
|
||||
dataIndex: 'count',
|
||||
rewriting: true,
|
||||
rewroteCell: {
|
||||
type: 'input',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '删除',
|
||||
dataIndex: 'del',
|
||||
},
|
||||
];
|
||||
export const columns: Array<BasicColumn[]> = [serviceColumns, archiveColumns, bigColumns, healthColumns, hmedicalColumns];
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
const dataSource = [
|
||||
{
|
||||
name: 'latestCall',
|
||||
count: 'gross',
|
||||
latestCallStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'latestAcceptCall',
|
||||
count: 'alerdyreceive',
|
||||
latestAcceptCallStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'illNum',
|
||||
count: 'jqqz',
|
||||
illNumStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'emergencyNum',
|
||||
count: 'dbjy',
|
||||
emergencyNumStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'totalAccept',
|
||||
count: 'totaldeal',
|
||||
totalAcceptStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'totalDisposal',
|
||||
count: 'totalacceptance',
|
||||
totalDisposalStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'hospitalCount',
|
||||
count: 'oneTwenty',
|
||||
hospitalCountStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'emergencyCount',
|
||||
count: 'hospital',
|
||||
emergencyCountStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'weightLossCountDay',
|
||||
count: 'weightLossCountDay',
|
||||
weightLossCountDayStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'weightLossCountMonth',
|
||||
count: 'weightLossCountMonth',
|
||||
weightLossCountMonthStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'weightLossAbnormalCountDay',
|
||||
count: 'weightLossAbnormalCountDay',
|
||||
weightLossAbnormalCountDayStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'weightLossAbnormalCountMonth',
|
||||
count: 'weightLossAbnormalCountMonth',
|
||||
weightLossAbnormalCountMonthStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'bloodSugarCountDay',
|
||||
count: 'bloodSugarCountDay',
|
||||
bloodSugarCountDayStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'bloodSugarCountMonth',
|
||||
count: 'bloodSugarCountMonth',
|
||||
bloodSugarCountMonthStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'bloodSugarAbnormalCountDay',
|
||||
count: 'bloodSugarAbnormalCountDay',
|
||||
bloodSugarAbnormalCountDayStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'bloodSugarAbnormalCountMonth',
|
||||
count: 'bloodSugarAbnormalCountMonth',
|
||||
bloodSugarAbnormalCountMonthStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'bloodPressureCountDay',
|
||||
count: 'bloodPressureCountDay',
|
||||
bloodPressureCountDayStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'bloodPressureCountMonth',
|
||||
count: 'bloodPressureCountMonth',
|
||||
bloodPressureCountMonthStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'bloodPressureAbnormalCountDay',
|
||||
count: 'bloodPressureAbnormalCountDay',
|
||||
bloodPressureAbnormalCountDayStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'bloodPressureAbnormalCountMonth',
|
||||
count: 'bloodPressureAbnormalCountMonth',
|
||||
bloodPressureAbnormalCountMonthStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'totalCount',
|
||||
count: 'totalCount',
|
||||
totalCountStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'cardiovaAbCount',
|
||||
count: 'cardiovaAbCount',
|
||||
cardiovaAbCountStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'cerebrovAbCount',
|
||||
count: 'cerebrovAbCount',
|
||||
cerebrovAbCountStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'cctaAbCount',
|
||||
count: 'cctaAbCount',
|
||||
cctaAbCountStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
count: 'name',
|
||||
nameStatus: false,
|
||||
},
|
||||
{
|
||||
name: 'count',
|
||||
count: 'count',
|
||||
countStatus: false,
|
||||
},
|
||||
];
|
||||
|
||||
export const dJson = {
|
||||
latestCall: false,
|
||||
latestAcceptCall: false,
|
||||
illNum: false,
|
||||
emergencyNum: false,
|
||||
totalAccept: false,
|
||||
totalDisposal: false,
|
||||
hospitalCount: false,
|
||||
emergencyCount: false,
|
||||
weightLossCountDay: false,
|
||||
weightLossCountMonth: false,
|
||||
weightLossAbnormalCountDay: false,
|
||||
weightLossAbnormalCountMonth: false,
|
||||
bloodSugarCountDay: false,
|
||||
bloodSugarCountMonth: false,
|
||||
bloodSugarAbnormalCountDay: false,
|
||||
bloodSugarAbnormalCountMonth: false,
|
||||
bloodPressureCountDay: false,
|
||||
bloodPressureCountMonth: false,
|
||||
bloodPressureAbnormalCountDay: false,
|
||||
bloodPressureAbnormalCountMonth: false,
|
||||
totalCount: false,
|
||||
cardiovaAbCount: false,
|
||||
cerebrovAbCount: false,
|
||||
cctaAbCount: false,
|
||||
name: false,
|
||||
count: false,
|
||||
};
|
||||
|
||||
export function getCount(name: string) {
|
||||
console.log(dataSource, dJson);
|
||||
return dataSource.find((item) => item.name === name)?.count;
|
||||
}
|
||||
@@ -33,28 +33,18 @@
|
||||
<a-button type="primary" @click="changeCalculateStatus" :loading="saveLoading">{{ isCalculate ? `保存` : `录入` }}</a-button>
|
||||
<a-button style="margin-left: 5px" v-if="isCalculate" @click="changeCalculateStatusFalse">取消</a-button>
|
||||
<a-button style="margin-left: 5px" type="primary" @click="addListItem" v-if="isCalculate && activeKey == 32">添加</a-button>
|
||||
<span style="margin-left: 5px" v-if="activeKey == 32">
|
||||
状态:
|
||||
<a-switch
|
||||
v-model:checked="checked1"
|
||||
checked-children="开"
|
||||
un-checked-children="关"
|
||||
@change="changeSwitch"
|
||||
:loading="switchLoading"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="isCalculate" #bodyCell="{ column, record, index }">
|
||||
<div v-if="column?.rewriting">
|
||||
<a-input-number v-if="column?.rewroteCell.type === 'inputNumber'" v-model:value="record[column.dataIndex]" />
|
||||
<a-input v-if="column?.rewroteCell.type === 'input'" v-model:value="record[column.dataIndex]" />
|
||||
<a-input v-if="column?.rewroteCell.type === 'input'" style="width: 80%" v-model:value="record[column.dataIndex]" />
|
||||
</div>
|
||||
<div v-if="column.dataIndex == 'status'">
|
||||
<a-switch
|
||||
v-model:checked="checked1"
|
||||
checked-children="开"
|
||||
v-model:checked="dJson[column.dataIndex]"
|
||||
checked-children="开22112"
|
||||
un-checked-children="关"
|
||||
@change="changeSwitch"
|
||||
:loading="switchLoading"
|
||||
@@ -64,13 +54,24 @@
|
||||
<a-button type="text" style="color: #1890ff" @click="delData(index)">删除</a-button>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else #bodyCell="{ column }">
|
||||
<div v-if="column.dataIndex == 'status'">
|
||||
<template v-else #bodyCell="{ column, record }">
|
||||
<div v-if="column?.rewriting" style="display: flex; align-items: center; justify-content: center">
|
||||
{{ record[column.dataIndex] }}
|
||||
<a-switch
|
||||
v-model:checked="checked1"
|
||||
v-if="activeKey != 32 && record[column.dataIndex]"
|
||||
v-model:checked="dJson[column.dataIndex]"
|
||||
checked-children="开"
|
||||
un-checked-children="关"
|
||||
@change="changeSwitch"
|
||||
style="margin-left: 5px"
|
||||
@change="changeSwitchNew(column.dataIndex)"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="column.dataIndex == 'status'">
|
||||
<a-switch
|
||||
v-model:checked="record.status"
|
||||
checked-children="开"
|
||||
un-checked-children="关"
|
||||
@change="changeSwitchMedicalNew(record)"
|
||||
:loading="switchLoading"
|
||||
/>
|
||||
</div>
|
||||
@@ -85,15 +86,21 @@
|
||||
import BasicTable from '/@/components/Table/src/BasicTable.vue';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { onMounted, ref, watch } from 'vue';
|
||||
import { dJson, getCount } from '/@/views/emergency/bigScreenOther/currencyOther.hook';
|
||||
import {
|
||||
listApi,
|
||||
listNewApi,
|
||||
saveApi,
|
||||
statusApi,
|
||||
changeStatusApi,
|
||||
saveElApi,
|
||||
editValueApi,
|
||||
xjCountFakerDataApi,
|
||||
listMedicalApi,
|
||||
editMedicalValueApi,
|
||||
editDataApi,
|
||||
} from '/@/views/emergency/bigScreenOther/currencyOther.api';
|
||||
import { columns } from '/@/views/emergency/bigScreenOther/currencyOther.data';
|
||||
import { columns, columns32 } from '/@/views/emergency/bigScreenOther/currencyOther.data';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { allCenterApi } from '/@/views/emergency/scheduling/scheduling.api';
|
||||
import ApiSelect from '/@/components/Form/src/components/ApiSelect.vue';
|
||||
@@ -140,25 +147,24 @@
|
||||
]);
|
||||
const { tableContext } = useListPage({
|
||||
tableProps: {
|
||||
api: listApi,
|
||||
// columns: props.columns,
|
||||
api: listNewApi,
|
||||
beforeFetch: (params) => {
|
||||
const redisKey = ['house:fakerData:groupUser'];
|
||||
console.log(redisKey, 'ahjshjsdhj');
|
||||
params['module'] = activeKey.value;
|
||||
params['redisKey'] = activeKey.value == 9 ? redisKey[activeKey.value - 9] : redisKey[activeKey.value - 30];
|
||||
params['centerId'] = centerId.value;
|
||||
return params;
|
||||
},
|
||||
afterFetch: async () => {
|
||||
let { code, result, message: msg } = getRawDataSource();
|
||||
const res = await statusApi({ centerId: centerId.value }, centerId.value);
|
||||
checked1.value = res[activeKey.value] ? res[activeKey.value] : false;
|
||||
if (code == 200) {
|
||||
return activeKey.value == 32 ? result : [result];
|
||||
} else {
|
||||
message.warn(msg);
|
||||
Object.keys(dJson).forEach((item) => {
|
||||
dJson[item] = getRawDataSource()[`${item}Status`] == 1;
|
||||
});
|
||||
if (activeKey.value == 32) {
|
||||
getRawDataSource().forEach((item) => {
|
||||
item.status = item.status == 1;
|
||||
});
|
||||
}
|
||||
return activeKey.value == 32 ? getRawDataSource() : [getRawDataSource()];
|
||||
},
|
||||
tableSetting: {
|
||||
redo: true,
|
||||
@@ -174,7 +180,6 @@
|
||||
});
|
||||
|
||||
function addListItem() {
|
||||
console.log(getDataSource());
|
||||
let data = JSON.parse(JSON.stringify(getDataSource()));
|
||||
data.push({});
|
||||
setTableData(data);
|
||||
@@ -188,11 +193,19 @@
|
||||
|
||||
async function changeCalculateStatus() {
|
||||
if (!centerId.value) return message.info('请先选择应急分中心');
|
||||
if (!isCalculate.value) return (isCalculate.value = true);
|
||||
|
||||
if (!isCalculate.value && activeKey.value == 32) {
|
||||
console.log(1233);
|
||||
setProps({
|
||||
columns: columns32,
|
||||
});
|
||||
}
|
||||
if (!isCalculate.value) {
|
||||
return (isCalculate.value = true);
|
||||
}
|
||||
try {
|
||||
if (activeKey.value == 32) {
|
||||
let d = getDataSource();
|
||||
console.log(d, 'ddddddd');
|
||||
for (let i = 0; i < d.length; i++) {
|
||||
if (!d[i].name) {
|
||||
return message.info(`第${i + 1}条的体检机构不能为空`);
|
||||
@@ -201,21 +214,36 @@
|
||||
return message.info(`第${i + 1}条的人数不能为空`);
|
||||
}
|
||||
d[i]['centerId'] = centerId.value;
|
||||
d[i]['value'] = d[i].count;
|
||||
d[i]['status'] = 0;
|
||||
d[i]['type'] = 32;
|
||||
}
|
||||
saveLoading.value = true;
|
||||
switchLoading.value = false;
|
||||
await xjCountFakerDataApi(d, centerId.value);
|
||||
editMedicalValueApi(d, centerId.value).then(() => {
|
||||
reload();
|
||||
saveLoading.value = false;
|
||||
isCalculate.value = false;
|
||||
setProps({
|
||||
columns: columns[activeKey.value - 30],
|
||||
});
|
||||
});
|
||||
} else {
|
||||
saveLoading.value = true;
|
||||
switchLoading.value = false;
|
||||
await saveApi({
|
||||
...(activeKey.value == 9 ? { ...getDataSource()[0], totalAccept: 0, totalDisposal: 0 } : getDataSource()[0]),
|
||||
module: activeKey.value,
|
||||
centerId: centerId.value,
|
||||
editDataApi(
|
||||
{
|
||||
...(activeKey.value == 9 ? { ...getDataSource()[0], totalAccept: 0, totalDisposal: 0 } : getDataSource()[0]),
|
||||
module: activeKey.value,
|
||||
centerId: centerId.value,
|
||||
},
|
||||
centerId.value
|
||||
).then(() => {
|
||||
reload();
|
||||
saveLoading.value = false;
|
||||
isCalculate.value = false;
|
||||
});
|
||||
}
|
||||
saveLoading.value = false;
|
||||
await reload();
|
||||
} catch (e) {
|
||||
saveLoading.value = false;
|
||||
|
||||
@@ -226,6 +254,11 @@
|
||||
isCalculate.value = false;
|
||||
saveLoading.value = false;
|
||||
switchLoading.value = false;
|
||||
if (activeKey.value == 32) {
|
||||
setProps({
|
||||
columns: columns[activeKey.value - 30],
|
||||
});
|
||||
}
|
||||
reload();
|
||||
}
|
||||
|
||||
@@ -240,6 +273,30 @@
|
||||
switchLoading.value = false;
|
||||
}
|
||||
}
|
||||
function changeSwitchMedicalNew(record) {
|
||||
const params = {
|
||||
id: record.id,
|
||||
type: 32,
|
||||
status: record.status ? 1 : 0,
|
||||
centerId: centerId.value,
|
||||
value: record.count,
|
||||
};
|
||||
editValueApi(params, centerId.value).then(() => {
|
||||
reload();
|
||||
});
|
||||
}
|
||||
async function changeSwitchNew(name) {
|
||||
const count = getCount(name);
|
||||
const params = {
|
||||
centerId: centerId.value,
|
||||
type: count,
|
||||
value: getDataSource()[0][name],
|
||||
status: dJson[name] ? 1 : 0,
|
||||
};
|
||||
editValueApi(params, centerId.value).then(() => {
|
||||
reload();
|
||||
});
|
||||
}
|
||||
|
||||
function handleChange() {
|
||||
saveLoading.value = false;
|
||||
@@ -247,6 +304,7 @@
|
||||
isCalculate.value = false;
|
||||
setProps({
|
||||
columns: activeKey.value == 9 ? columns[activeKey.value - 9] : columns[activeKey.value - 30],
|
||||
api: activeKey.value !== 32 ? listNewApi : listMedicalApi,
|
||||
});
|
||||
if (centerId.value) {
|
||||
reload();
|
||||
@@ -256,6 +314,7 @@
|
||||
onMounted(() => {
|
||||
setProps({
|
||||
columns: activeKey.value == 9 ? columns[activeKey.value - 9] : columns[activeKey.value - 30],
|
||||
api: activeKey.value !== 32 ? listNewApi : listMedicalApi,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user