update
1.更新im 2.修改bug
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
@cancel="clearData"
|
||||
:maskClosable="false"
|
||||
>
|
||||
<div class="map-search-box">
|
||||
<div class="map-search-box" v-if="props.isEdit === '0'">
|
||||
<a-select
|
||||
v-model:value="intValue"
|
||||
allow-clear
|
||||
@@ -42,12 +42,22 @@
|
||||
import { Position } from '/@/views/consult/resource/components/Map';
|
||||
import mapKey from '/@/utils/mapKey';
|
||||
import { message } from 'ant-design-vue';
|
||||
import {mapCenter} from "/@/utils/mapInfo";
|
||||
import { mapCenter } from '/@/utils/mapInfo';
|
||||
let geocoder = ref();
|
||||
const emit = defineEmits(['getPosition']);
|
||||
let BasicMap = null;
|
||||
let SelfMap = null;
|
||||
const isCLickMap = ref(false);
|
||||
const props = defineProps({
|
||||
isEdit: {
|
||||
type: String,
|
||||
default: () => '0',
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: () => '地图选点',
|
||||
},
|
||||
});
|
||||
let positionRef = ref({
|
||||
lng: '',
|
||||
lat: '',
|
||||
@@ -60,12 +70,12 @@
|
||||
});
|
||||
let adr = ref('');
|
||||
let position: Position = positionRef.value;
|
||||
const title = '地图选点';
|
||||
const intValue = ref('');
|
||||
let placeSearch = ref();
|
||||
let panelList = ref([]);
|
||||
//表单赋值
|
||||
const [registerModal, { closeModal }] = useModalInner(async (data) => {
|
||||
const [registerModal, { closeModal, setModalProps }] = useModalInner(async (data) => {
|
||||
setModalProps({ showOkBtn: props.isEdit === '0', showCancelBtn: props.isEdit === '0' });
|
||||
let { longitude: lng, latitude: lat, address } = data?.record || {};
|
||||
position.lng = lng;
|
||||
position.lat = lat;
|
||||
@@ -82,7 +92,7 @@
|
||||
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
||||
plugins: ['AMap.Geocoder'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
||||
})
|
||||
.then((AMap) => {
|
||||
.then(async (AMap) => {
|
||||
SelfMap = AMap;
|
||||
//设置地图容器id
|
||||
BasicMap = new AMap.Map('container', {
|
||||
@@ -91,14 +101,29 @@
|
||||
center: mapCenter, //初始化地图中心点位置
|
||||
resizeEnable: true,
|
||||
});
|
||||
// 注册搜索插件
|
||||
bindSearch(AMap);
|
||||
bindEvent();
|
||||
// 注册坐标转地址
|
||||
geocoder.value = new AMap.Geocoder({
|
||||
city: '', //城市设为北京,默认:“全国”
|
||||
radius: 1000, //范围,默认:500
|
||||
});
|
||||
if (props.isEdit === '0') {
|
||||
// 注册搜索插件
|
||||
bindSearch(AMap);
|
||||
bindEvent();
|
||||
} else {
|
||||
if (position.lng && position.lat) {
|
||||
try {
|
||||
console.log(await lngLatToAddress({ lng: position.lng, lat: position.lat }));
|
||||
const infoWindow = new AMap.InfoWindow({
|
||||
anchor: 'top-center',
|
||||
content: await lngLatToAddress({ lng: position.lng, lat: position.lat }),
|
||||
});
|
||||
infoWindow.open(BasicMap, [position.lng, position.lat], 20);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (position.lng) {
|
||||
panTo(position);
|
||||
addMarker(position);
|
||||
|
||||
@@ -9,6 +9,7 @@ enum Api {
|
||||
generate = '/health-consultation/settle/generate/',
|
||||
add = '/health-consultation/settle/config/add',
|
||||
edit = '/health-consultation/settle/config/edit',
|
||||
del = '/health-consultation/settle/config/remove',
|
||||
}
|
||||
|
||||
export const listApi = (params = {}) => defHttp.get({ url: Api.list, params });
|
||||
@@ -19,3 +20,4 @@ export const generateApi = (id) => defHttp.post({ url: Api.generate + id }, { is
|
||||
export const addApi = (params = {}) => defHttp.post({ url: Api.add, params });
|
||||
export const editApi = (params = {}) => defHttp.post({ url: Api.edit, params });
|
||||
export const detailApi = (params = {}) => defHttp.get({ url: Api.detail + `/${params.id}` });
|
||||
export const delApi = (params = {}) => defHttp.delete({ url: Api.del + `/${params.id}` });
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'b'">
|
||||
<a-button class="list-button" type="link" @click="updateSetting(record)">编辑配置</a-button>
|
||||
<a-button class="list-button" type="link">删除</a-button>
|
||||
<a-button class="list-button" type="link" @click="delItem(record)">删除</a-button>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
@@ -59,9 +59,10 @@
|
||||
import SettlementConsult from '/@/views/consult/settlement/components/settlementConsult.vue';
|
||||
import AddDrawer from '/@/views/consult/settlement/components/addDrawer.vue';
|
||||
import { useDrawer } from '/@/components/Drawer';
|
||||
import { generateApi, listApi } from '/@/views/consult/settlement/settlement.api';
|
||||
import { delApi, generateApi, listApi } from '/@/views/consult/settlement/settlement.api';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { getFileAccessHttpUrlDown } from '/@/utils/common/compUtils';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const pageStatus = ref('settlement'); // 当前页面是哪个 settlement为list页 detail为详情页 month为月明细页 consult为咨询明细页
|
||||
|
||||
@@ -70,6 +71,7 @@
|
||||
const consultId = ref('');
|
||||
|
||||
const toConsult = ref('');
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
const [registerDrawer, { openDrawer }] = useDrawer();
|
||||
|
||||
@@ -111,6 +113,18 @@
|
||||
});
|
||||
}
|
||||
|
||||
function delItem(record: Recordable) {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认操作',
|
||||
content: '是否删除该结算',
|
||||
onOk: async () => {
|
||||
await delApi({ id: record.id });
|
||||
await reload();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function MonthPage(path, id) {
|
||||
pageStatus.value = path;
|
||||
if (path === 'consult') consultId.value = id;
|
||||
|
||||
@@ -18,6 +18,7 @@ const api = {
|
||||
updateSalvageUser: '/health-emergency/api/emergency/order/updateSalvageUser', // 驻场派单保存
|
||||
stat: '/health-emergency/api/emergency/stat', //数据统计
|
||||
scheduleRecord: '/health-emergency/api/emergency/schedule/scheduleShow', //年/月值班记录
|
||||
scheduleRecordNew: '/health-emergency/api/emergency/schedule/scheduleShow/v2', //年/月值班记录
|
||||
// queryById: '/health-emergency/emergency/emergencySeriousDisease/queryById', // 通过id查询大病就医单
|
||||
queryById: '/health-emergency/emergency/emergencySeriousDisease/queryById', // 通过id查询大病就医单
|
||||
dispatchStation: '/health-emergency/emergency/emergencySeriousDisease/dispatchStation', // 大病就医驻场派单
|
||||
@@ -101,6 +102,9 @@ export const stat = (params) => {
|
||||
export const scheduleRecordApi = (params) => {
|
||||
return defHttp.get({ url: api.scheduleRecord, params });
|
||||
};
|
||||
export const scheduleRecordNewApi = (params) => {
|
||||
return defHttp.get({ url: api.scheduleRecordNew, params });
|
||||
};
|
||||
|
||||
export const queryByIdApi = (params) => {
|
||||
return defHttp.get({ url: api.queryById, params }, { successNeedMessage: false });
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
:bordered="isSpecialized"
|
||||
:readonly="!isSpecialized"
|
||||
v-model:value="modalText"
|
||||
placeholder=""
|
||||
:placeholder="getUserInfo.personType === '5' ? '暂无' : '请输入救助意见'"
|
||||
:rows="5"
|
||||
/>
|
||||
<div style="text-align: center; padding: 10px">
|
||||
@@ -22,12 +22,16 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { salvageOpinionApi, addSalvageOpinionApi } from '/@/views/emergency/communication/components/commApi';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const visible = ref<Boolean>(false);
|
||||
const confirmLoading = ref<Boolean>(false);
|
||||
const modalText = ref<String>('');
|
||||
const pId = ref<String>('');
|
||||
const isDisabled = ref<Boolean>(true);
|
||||
|
||||
const { getUserInfo } = useUserStore();
|
||||
|
||||
const handleOk = () => {
|
||||
confirmLoading.value = true;
|
||||
addSalvageOpinionApi({ sessionId: pId.value, infoDesc: modalText.value })
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
import { ref } from 'vue';
|
||||
import { Dayjs } from 'dayjs';
|
||||
import detail from './detail.vue';
|
||||
import { stat, scheduleRecordApi } from './commApi';
|
||||
import { stat, scheduleRecordApi, scheduleRecordNewApi } from './commApi';
|
||||
import forHelpAdv from './forHelpAdv.vue';
|
||||
import moment from 'moment';
|
||||
import qs from 'qs';
|
||||
@@ -246,21 +246,28 @@
|
||||
year: year,
|
||||
month: month,
|
||||
};
|
||||
scheduleRecordApi(params)
|
||||
.then((res) => {
|
||||
if (res.months !== null) {
|
||||
let result = [];
|
||||
res.months.forEach((item) => {
|
||||
item.days.forEach((it) => {
|
||||
result.push(item.month + '-' + it.day);
|
||||
});
|
||||
});
|
||||
dayS.value = result;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
// scheduleRecordApi(params)
|
||||
// .then((res) => {
|
||||
// if (res.months !== null) {
|
||||
// let result = [];
|
||||
// res.months.forEach((item) => {
|
||||
// item.days.forEach((it) => {
|
||||
// result.push(item.month + '-' + it.day);
|
||||
// });
|
||||
// });
|
||||
// dayS.value = result;
|
||||
// }
|
||||
// })
|
||||
// .catch((e) => {
|
||||
// console.log(e);
|
||||
// });
|
||||
scheduleRecordNewApi(params).then((res: any) => {
|
||||
if (res) {
|
||||
dayS.value = res.map((item) => {
|
||||
return `${month}-${item}`;
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
const nowDate = new Date();
|
||||
scheduleRecord(nowDate.getFullYear(), nowDate.getMonth() + 1);
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<div class="outer">
|
||||
<!-- 专业人员 -->
|
||||
<specialized :imProps="imProps" v-if="isSpecialized === '6'" />
|
||||
<opearate :imProps="imProps" v-if="isSpecialized === '5'" />
|
||||
<!-- 操作人员 -->
|
||||
<operate :imProps="imProps" v-if="isSpecialized === '5'" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import specialized from './components/specialized.vue';
|
||||
import opearate from './components/operate.vue';
|
||||
import operate from './components/operate.vue';
|
||||
import { userSigAndroidApi } from '/@/views/emergency/communication/components/commApi';
|
||||
import { getToken } from '/@/utils/auth';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :drop-down-actions="getDropAction(record)" />
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<emergency-drawer @register="registerDrawer" />
|
||||
@@ -68,16 +68,9 @@
|
||||
import { useDrawer } from '/@/components/Drawer';
|
||||
import EmergencyDrawer from '/@/views/emergency/emergencyManage/components/emergencyDrawer.vue';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import {
|
||||
delCenterApi,
|
||||
exportApi,
|
||||
listApi,
|
||||
settingDefaultCenterApi,
|
||||
updateCenterStatusApi,
|
||||
} from '/@/views/emergency/emergencyManage/emergencyManage.api';
|
||||
import { exportApi, listApi, settingDefaultCenterApi, updateCenterStatusApi } from '/@/views/emergency/emergencyManage/emergencyManage.api';
|
||||
import EmergencyInfoDrawer from '/@/views/emergency/emergencyManage/components/emergencyInfoDrawer.vue';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { queryDepartTreeSync } from '/@/views/system/depart/depart.api';
|
||||
import ExportUtil from '/@/utils/export/exportUtil.vue';
|
||||
import EmergencyMedicalModal from '/@/views/emergency/emergencyManage/components/emergencyMedicalModal.vue';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
@@ -96,8 +89,6 @@
|
||||
}
|
||||
});
|
||||
|
||||
function onSelectMedicalOk() {}
|
||||
|
||||
function exportInfo() {
|
||||
const params = getForm().getFieldsValue();
|
||||
exportApi(params);
|
||||
@@ -106,69 +97,6 @@
|
||||
openExportDrawer(true, {});
|
||||
}
|
||||
|
||||
// async function loadRootTreeData() {
|
||||
// try {
|
||||
// treeData.value = [];
|
||||
//
|
||||
// const fResult = await queryDepartTreeSync({});
|
||||
// if (!fResult || fResult.length < 0) return;
|
||||
// const result = await queryDepartTreeSync({ pid: fResult[0].id });
|
||||
// if (Array.isArray(result)) {
|
||||
// result.forEach((item: any) => {
|
||||
// item['preTitle'] = item.title;
|
||||
// item['key'] = item['orgCode'];
|
||||
// });
|
||||
// treeData.value = result;
|
||||
// }
|
||||
// } catch {}
|
||||
// }
|
||||
//
|
||||
// loadRootTreeData();
|
||||
// async function onLoadData(treeNode) {
|
||||
// try {
|
||||
// const result = await queryDepartTreeSync({
|
||||
// pid: treeNode.dataRef.id,
|
||||
// });
|
||||
// if (result && result.length == 0) {
|
||||
// treeNode.dataRef.isLeaf = true;
|
||||
// } else {
|
||||
// treeNode.dataRef.children = result
|
||||
// ? result.map((item: any) => {
|
||||
// item['pId'] = treeNode.dataRef.id;
|
||||
// item['preTitle'] = treeNode.dataRef.preTitle + '/' + item.title;
|
||||
// item['key'] = item['orgCode'];
|
||||
// return item;
|
||||
// })
|
||||
// : [];
|
||||
//
|
||||
// preData(
|
||||
// treeData.value,
|
||||
// treeNode.dataRef.id,
|
||||
// result
|
||||
// ? result.map((item: any) => {
|
||||
// item['pId'] = treeNode.dataRef.id;
|
||||
// item['key'] = item['orgCode'];
|
||||
// return item;
|
||||
// })
|
||||
// : []
|
||||
// );
|
||||
// }
|
||||
// } catch (e) {
|
||||
// console.error(e);
|
||||
// }
|
||||
// return Promise.resolve(true);
|
||||
// }
|
||||
|
||||
function preData(data, id, res) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i]?.id === id) {
|
||||
data[i].children = res;
|
||||
return;
|
||||
}
|
||||
preData(data[i].children, id, res);
|
||||
}
|
||||
}
|
||||
|
||||
async function changeSwitch(record: Recordable) {
|
||||
try {
|
||||
record.loading1 = true;
|
||||
@@ -231,32 +159,9 @@
|
||||
},
|
||||
});
|
||||
|
||||
function getDropAction(record: Recordable) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '关联医疗点',
|
||||
onClick: handleMedical.bind(null, record),
|
||||
},
|
||||
// {
|
||||
// label: '删除',
|
||||
// onClick: handleDel.bind(null, record),
|
||||
// },
|
||||
];
|
||||
}
|
||||
|
||||
function handleSuccess() {
|
||||
reload();
|
||||
}
|
||||
function handleMedical(record: Recordable) {
|
||||
openMedicalModal(true, { record });
|
||||
}
|
||||
// function handleDel(record: Recordable) {
|
||||
// delCenterApi(record, handleSuccess);
|
||||
// }
|
||||
|
||||
function getTableAction(record: Recordable) {
|
||||
return [
|
||||
@@ -272,6 +177,10 @@
|
||||
label: '大屏账号',
|
||||
onClick: bigScreenUser.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ export const columns: BasicColumn[] = [
|
||||
title: '员工位置',
|
||||
align: 'center',
|
||||
dataIndex: 'initiatorLongitude',
|
||||
width: 80,
|
||||
customRender: ({ record }) => {
|
||||
// @ts-ignore
|
||||
const { initiatorLongitude, initiatorLatitude } = record;
|
||||
|
||||
@@ -2,6 +2,16 @@
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'initiatorLongitude'">
|
||||
<environment-outlined
|
||||
v-if="record?.initiatorLongitude && record?.initiatorLatitude"
|
||||
style="color: #1890ff; cursor: pointer"
|
||||
@click="getEmployeePosition(record)"
|
||||
/>
|
||||
<span v-else style="color: red"> 定位超时 </span>
|
||||
</template>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
@@ -12,6 +22,7 @@
|
||||
<OrderDrawer ref="RefOrderDrawer" />
|
||||
<detail ref="detailRef" />
|
||||
<OrderRecord @register="registerModal" />
|
||||
<Map @register="registerMap" is-edit="1" title="员工位置" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -21,14 +32,15 @@
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import OrderDrawer from './components/OrderDrawer.vue';
|
||||
import { EnvironmentOutlined } from '@ant-design/icons-vue';
|
||||
import { columns, searchFormSchema, columnsPersonF, columnsPersonS, searchFormSchemaS } from './Order.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, resEditData, newList } from './Order.api';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { list, deleteOne, getImportUrl, getExportUrl, resEditData, newList } from './Order.api';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import detail from '/@/views/emergency/communication/components/detail.vue';
|
||||
import { router } from '/@/router';
|
||||
|
||||
import OrderRecord from '/@/views/emergency/outburst/order/components/OrderRecord.vue';
|
||||
import Map from '/@/views/consult/resource/components/Map.vue';
|
||||
//注册model
|
||||
const [registerModal, { openModal }] = useModal();
|
||||
|
||||
@@ -75,6 +87,14 @@
|
||||
});
|
||||
|
||||
const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
|
||||
const [registerMap, { openModal: openMapModal }] = useModal();
|
||||
function getEmployeePosition(record: Recordable) {
|
||||
openMapModal(true, {
|
||||
record: { ...record, longitude: record.initiatorLongitude, latitude: record.initiatorLatitude, address: '' },
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user