diff --git a/src/utils/settings.ts b/src/utils/settings.ts index 810083c..737d2d0 100644 --- a/src/utils/settings.ts +++ b/src/utils/settings.ts @@ -32,7 +32,34 @@ export const sexTypeList = [ value: SexType.female, }, ]; - +export const sexTypeListNew = [ + { + label: '全部', + value: '', + }, + { + label: '男', + value: SexType.male, + }, + { + label: '女', + value: SexType.female, + }, +]; +export const initatorTypee = [ + { + label: '全部', + value: '', + }, + { + label: '120', + value: '0', + }, + { + label: '应急就医', + value: '1', + }, +]; export const normalTypeList = [ { label: '全部', diff --git a/src/views/indexSun.vue b/src/views/indexSun.vue index 8d14332..9515020 100644 --- a/src/views/indexSun.vue +++ b/src/views/indexSun.vue @@ -49,6 +49,7 @@ :useForm="true" :column="indexColumn" :firstForm="firstFormOne" + :need-dept="needDept" :twoROnly="twoROnly" /> @@ -79,7 +80,15 @@ import { useUserStore } from '/@/store/modules/user.ts'; const { getCenterInfo } = useUserStore(); - import { threeRModalApi, twoRModal1Api, twoRModal2Api, twoRModal3Api } from '/@/views/indexSun/indexSun.api.ts'; + import { + oneLApi, + statisticsNewApi, + threeRModalApi, + twoLModalApi, + twoRModal1Api, + twoRModal2Api, + twoRModal3Api, + } from '/@/views/indexSun/indexSun.api.ts'; import dayjs from 'dayjs'; //0:处置 1:处理 2:呼入 3:全部 const phoneType = ref(''); @@ -93,6 +102,7 @@ const centerId = ref(); const apiParams = ref(); const modalApi = ref(); + const needDept = ref(false); const twoROnly = ref(); onMounted(() => { const centerInfo = getAuthCache('centerInfo'); @@ -108,6 +118,12 @@ indexModalTitle.value = name; firstFormOne.value = fromLists[0]; indexColumn.value = columns[0]; + modalApi.value = oneLApi; + needDept.value = false; + apiParams.value = { + phoneType: key == 'gross' ? 0 : 1, + centerId: centerId.value, + }; twoROnly.value = ''; nextTick(() => { indexModalRef.value.openDialog(); @@ -120,6 +136,8 @@ indexColumn.value = columns[1]; firstFormOne.value = fromLists[1]; twoROnly.value = ''; + modalApi.value = twoLModalApi; + needDept.value = true; nextTick(() => { indexModalRef.value.openDialog(); }); @@ -310,6 +328,7 @@ modalApi.value = threeRModalApi; twoROnly.value = ''; apiParams.value = { queryType: type }; + needDept.value = false; firstFormOne.value = threeRModalFromList; nextTick(() => { indexModalRef.value.openDialog(); @@ -319,6 +338,7 @@ const textArr = ['健康打卡减重数据', '健康打卡减血糖数据', '健康打卡血压数据']; indexModalTitle.value = textArr[data.type - 1]; indexColumn.value = towRcolumns[data.type - 1]; + needDept.value = false; twoROnly.value = data; const apiArr = [twoRModal1Api, twoRModal2Api, twoRModal3Api]; const params = { diff --git a/src/views/indexSun/indexModal.vue b/src/views/indexSun/indexModal.vue index fa9f45e..01f956d 100644 --- a/src/views/indexSun/indexModal.vue +++ b/src/views/indexSun/indexModal.vue @@ -13,10 +13,10 @@ :options="item.options" /> - + - + @@ -89,6 +89,9 @@ apiParams: { type: Object, }, + needDept: { + type: Boolean, + }, }); const loading = ref(false); const formState = ref(); @@ -236,6 +239,7 @@ formState.value = { ...formState.value, ...formRecord.value, + salvageUserDepart: orgCode2.value ? orgCode2.value : orgCode1.value ? orgCode1.value : '', }; // registerTable.value.getRecords(); } @@ -243,14 +247,21 @@ const { visible, closeDialog, openDialog } = useDialog({ title: dialogTitle.value }); function handleClose() { + orgCode2.value = ''; + orgCode1.value = ''; + formState.value = {}; + console.log(formState.value, formRecord.value, 'asjshj'); formRecord.value = {}; closeDialog(); } function handleClickReset() { + orgCode2.value = ''; + orgCode1.value = ''; getField(); formState.value = { ...formState.value, ...formRecord.value, + salvageUserDepart: '', }; console.log(formState.value, formRecord.value); } @@ -285,6 +296,7 @@ display: flex; .ant-form-item { flex: 1; + max-width: 200px; margin-bottom: 0 !important; } } diff --git a/src/views/indexSun/indexSun.api.ts b/src/views/indexSun/indexSun.api.ts index 3482edd..b985749 100644 --- a/src/views/indexSun/indexSun.api.ts +++ b/src/views/indexSun/indexSun.api.ts @@ -2,7 +2,9 @@ import { post, get } from '/@/api/request.ts'; enum Api { statisticsNew = '/health-emergency/emergency/LargeScreenNew/statisticsNew', + oneL = '/health-emergency/emergency/LargeScreenNew/phoneListNew', twoL = '/health-emergency/emergency/tblHelpCenter/sicknessTypeStatistic', + twoLModal = '/health-emergency/emergency/order/list', threeL = '/health-emergency/emergency/LargeScreenNew/medicalPeopleNumStatistics', oneR = '/health-watch/watch/watchMonitorData/getMonitorList', threeR = '/health-emergency/emergency/LargeScreenNew/medicalAbnormalStatistics', @@ -18,6 +20,8 @@ enum Api { export const statisticsNewApi = (params) => post(Api.statisticsNew, params); export const twoLApi = (params) => get(Api.twoL, params); +export const twoLModalApi = (params) => get(Api.twoLModal, params); +export const oneLApi = (params) => post(Api.oneL, params); export const threeLApi = (params) => post(Api.threeL, params); export const oneRApi = (params) => get(Api.oneR, params); export const threeRApi = (params) => post(Api.threeR, params); diff --git a/src/views/indexSun/indexSun.ts b/src/views/indexSun/indexSun.ts index 9f13636..f9fb9e0 100644 --- a/src/views/indexSun/indexSun.ts +++ b/src/views/indexSun/indexSun.ts @@ -1,6 +1,6 @@ import * as echarts from 'echarts'; import { legend1, legend2, legend3, legend4, legend5 } from '/@/components/xianMap/xianMapHooks.ts'; -import { normalTypeList, SexType, sexTypeList } from '/@/utils/settings.ts'; +import { initatorTypee, normalTypeList, SexType, sexTypeList, sexTypeListNew } from '/@/utils/settings.ts'; export const legend1 = new URL('/@/assets/img/legend1.png', import.meta.url).href; export const legend2 = new URL('/@/assets/img/legend5.png', import.meta.url).href; export const legend3 = new URL('/@/assets/img/legend3.png', import.meta.url).href; @@ -182,38 +182,45 @@ const columns1 = [ const columns2 = [ { title: '被救助人', - dataIndex: 'realName', - key: 'realName', + dataIndex: 'salvageUserName', + key: 'salvageUserName', }, { title: '单位', - dataIndex: 'realName', - key: 'realName', + dataIndex: 'salvageUserSecondDepart', + key: 'salvageUserSecondDepart', }, { title: '部门', - dataIndex: 'realName', - key: 'realName', + dataIndex: 'salvageUserDepart', + key: 'salvageUserDepart', }, { title: '性别', - dataIndex: 'realName', - key: 'realName', + dataIndex: 'salvageUserSex_dictText', + key: 'salvageUserSex_dictText', }, { title: '救助方式', - dataIndex: 'realName', - key: 'realName', + dataIndex: 'initiatorType', + key: 'initiatorType', + customRender: ({ text }) => { + if (text === '0') { + return '120'; + } else if (text === '1') { + return '应急就医'; + } + }, }, { title: '救助时间', - dataIndex: 'realName', - key: 'realName', + dataIndex: 'createTime', + key: 'createTime', }, { title: '联系电话', - dataIndex: 'realName', - key: 'realName', + dataIndex: 'salvageUserMobile', + key: 'salvageUserMobile', }, ]; @@ -238,26 +245,26 @@ const fromList = [ const fromList2 = [ { label: '救助人', - field: 'realName', + field: 'salvageUserName', type: 'input', placeholder: '请输入', defaultValue: '', }, { label: '性别', - field: 'sex', + field: 'salvageUserSex', type: 'select', placeholder: '请选择性别', - options: sexTypeList, - defaultValue: SexType.all, + options: sexTypeListNew, + defaultValue: '', }, { label: '救助方式', - field: 'sex', + field: 'initiatorType', type: 'select', placeholder: '请选择性别', - options: sexTypeList, - defaultValue: SexType.all, + options: initatorTypee, + defaultValue: '', }, ]; @@ -473,6 +480,12 @@ export function twoRform(type) { options: normalTypeList, defaultValue: type, }, + { + label: '单位', + field: 'departName', + type: 'input', + placeholder: '请输入单位', + }, ]; } export const towRcolumns = [towRcolumn1, towRcolumn2, towRcolumn3];