diff --git a/src/api/platform/common/controller/mapLogistic.ts b/src/api/platform/common/controller/mapLogistic.ts
new file mode 100644
index 0000000..50960d1
--- /dev/null
+++ b/src/api/platform/common/controller/mapLogistic.ts
@@ -0,0 +1,25 @@
+/**
+ * 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致
+ * Copyright © 2020-2022 entfrm All rights reserved.
+ * author entfrm开发团队-王翔
+ */
+import type { MapLogisticParams, MapLogistic, MapLogisticResult } from '../entity/mapLogistic';
+import { defHttp } from '/@/utils/http/axios';
+
+enum Api {
+ list = '/common_proxy/common/mapLogistic/list',
+ get = '/common_proxy/common/mapLogistic',
+ add = '/common_proxy/common/mapLogistic/save',
+ edit = '/common_proxy/common/mapLogistic/update',
+ del = '/common_proxy/common/mapLogistic/remove'
+}
+
+export const listMapLogistic = (params?: Partial) => defHttp.get({ url: Api.list, params });
+
+export const addMapLogistic = (params: Partial) => defHttp.post({ url: Api.add, data: params });
+
+export const editMapLogistic = (params: Partial) => defHttp.put({ url: Api.edit, data: params });
+
+export const getMapLogistic = (id: string) => defHttp.get({ url: `${Api.get}/${id}` });
+
+export const delMapLogistic = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` });
diff --git a/src/api/platform/common/entity/mapLogistic.ts b/src/api/platform/common/entity/mapLogistic.ts
new file mode 100644
index 0000000..3862464
--- /dev/null
+++ b/src/api/platform/common/entity/mapLogistic.ts
@@ -0,0 +1,31 @@
+
+/**
+ * @program: kicc-ui
+ * @description: 地图任务主表实体类
+ * @author: entfrm开发团队-王翔
+ * @since: 2022/8/24
+ */
+
+import type { R } from '/#/axios';
+import type { CommonEntity, Page } from '/@/api/common/data/entity';
+
+export type MapLogisticParams = Page & MapLogistic;
+
+export interface MapLogistic extends CommonEntity {
+ id: string;
+ name: string;
+ courierUserId: string;
+ courierUserName: string;
+ courierLng: number;
+ courierLat: number;
+ sendOrderId: string;
+ sendOrderName: string;
+ sendOrderLng: number;
+ sendOrderLat: number;
+ fileId: string;
+ estimateTime: string;
+ requireTime: string;
+ batchCode: string;
+}
+
+export type MapLogisticResult = R;
diff --git a/src/api/platform/core/entity/user.ts b/src/api/platform/core/entity/user.ts
index 144d892..cea885a 100644
--- a/src/api/platform/core/entity/user.ts
+++ b/src/api/platform/core/entity/user.ts
@@ -59,6 +59,8 @@ export interface User extends CommonEntity {
loginIp: string;
// 最后登陆时间
loginTime: string;
+ // 地图标记点位置图片旋转值
+ mapOrientation: number;
// 用户状态
status: string;
// 备注信息
diff --git a/src/components/AMap/src/Amap.vue b/src/components/AMap/src/Amap.vue
index c0bc6ff..6645a47 100644
--- a/src/components/AMap/src/Amap.vue
+++ b/src/components/AMap/src/Amap.vue
@@ -20,11 +20,7 @@
>
@@ -57,6 +53,7 @@
import { useModal } from '/@/components/Modal';
import TaskModal from './TaskModal.vue';
import { propTypes } from '/@/utils/propTypes';
+ import { listHospital } from '/@/api/platform/common/controller/hospital';
const mapProps = defineProps({
sidebarControl: propTypes.bool.def(true)
@@ -81,7 +78,8 @@
smallHospitalId: '',
takeSpecimenId: ''
},
- takeSpecimenList: []
+ takeSpecimenList: [],
+ hospitalList: []
});
const AForm = Form;
const AFormItem = Form.Item;
@@ -122,6 +120,18 @@
}
};
mapState.loading = true;
+ // 初始化地图数据
+ listHospital({ size: 40 }).then(res => {
+ mapState.hospitalList = (res.data || []).map(item => ({
+ value: item.id,
+ label: item.name,
+ mapLat: item.mapLat,
+ mapLng: item.mapLng,
+ mapNotify: item.mapNotify,
+ mapOrientation: item.mapOrientation
+ }));
+ })
+
AMapLoader.load({
key: mapConfig.amapKey,
version: '2.0',
diff --git a/src/views/common/hospital/hospital.data.ts b/src/views/common/hospital/hospital.data.ts
index 6e20b33..2b070d4 100644
--- a/src/views/common/hospital/hospital.data.ts
+++ b/src/views/common/hospital/hospital.data.ts
@@ -148,6 +148,35 @@ export const formSchema: FormSchema[] = [
},
required: true,
},
+ {
+ field: 'mapOrientation',
+ label: '图片旋转值',
+ component: 'InputNumber',
+ componentProps: {
+ style: { width:'100%' },
+ min: 0
+ }
+ },
+ {
+ field: 'mapLng',
+ label: '位置经度值',
+ component: 'InputNumber',
+ componentProps: {
+ style: { width:'100%' },
+ min: 0
+ },
+ required: true
+ },
+ {
+ field: 'mapLat',
+ label: '位置纬度值',
+ component: 'InputNumber',
+ componentProps: {
+ style: { width:'100%' },
+ min: 0
+ },
+ required: true
+ },
{
field: 'contactName',
label: '联系人名称',
diff --git a/src/views/common/amapTask/AmapTaskModal.vue b/src/views/common/mapLogistic/MapLogisticModal.vue
similarity index 98%
rename from src/views/common/amapTask/AmapTaskModal.vue
rename to src/views/common/mapLogistic/MapLogisticModal.vue
index a4eadbc..c2fc1ff 100644
--- a/src/views/common/amapTask/AmapTaskModal.vue
+++ b/src/views/common/mapLogistic/MapLogisticModal.vue
@@ -1,6 +1,6 @@
diff --git a/src/views/common/amapTask/index.vue b/src/views/common/mapLogistic/index.vue
similarity index 86%
rename from src/views/common/amapTask/index.vue
rename to src/views/common/mapLogistic/index.vue
index 0bcfe18..a513f78 100644
--- a/src/views/common/amapTask/index.vue
+++ b/src/views/common/mapLogistic/index.vue
@@ -2,21 +2,21 @@
+ 预览
新增地图线路
+ >新增
@@ -36,22 +36,22 @@
*/
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useModal } from '/@/components/Modal';
- import { columns, searchFormSchema } from './amapTask.data';
+ import { columns, searchFormSchema } from './mapLogistic.data';
import { useMessage } from '/@/hooks/web/useMessage';
- import AmapTaskModal from './AmapTaskModal.vue';
+ import AmapTaskModal from './MapLogisticModal.vue';
+ import { listMapLogistic, delMapLogistic } from '/@/api/platform/common/controller/mapLogistic'
const { createConfirm, createMessage } = useMessage();
const [registerModal, { openModal }] = useModal();
const [registerTable, { reload, clearSelectedRowKeys, getSelectRowKeys }] = useTable({
title: '地图任务列表',
- //api: ,
+ api: listMapLogistic,
rowKey: 'id',
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
- autoSubmitOnEnter: true,
- fieldMapToTime: [['dateRange', ['beginTime', 'endTime'], 'YYYY-MM-DD']]
+ autoSubmitOnEnter: true
},
useSearchForm: true,
showTableSetting: true,
@@ -85,7 +85,7 @@
title: '警告',
content: `是否确认删除机构编号为${id}机构吗?`,
onOk: async () => {
-
+ await delMapLogistic(id);
createMessage.success('删除成功!');
handleRefreshTable();
}
diff --git a/src/views/common/amapTask/amapTask.data.ts b/src/views/common/mapLogistic/mapLogistic.data.ts
similarity index 97%
rename from src/views/common/amapTask/amapTask.data.ts
rename to src/views/common/mapLogistic/mapLogistic.data.ts
index a43a73b..a70ba9f 100644
--- a/src/views/common/amapTask/amapTask.data.ts
+++ b/src/views/common/mapLogistic/mapLogistic.data.ts
@@ -10,7 +10,6 @@ export const columns: BasicColumn[] = [
{
title: '收样员名称',
dataIndex: 'courierUserName',
- width: 120,
},
{
title: '收样员起点经度值',
@@ -23,7 +22,6 @@ export const columns: BasicColumn[] = [
{
title: '发单下级医院名称',
dataIndex: 'sendOrderName',
- width: 120
},
{
title: '发单起点经度值',
diff --git a/src/views/common/org/org.data.ts b/src/views/common/org/org.data.ts
index eabdd37..e5ebca9 100644
--- a/src/views/common/org/org.data.ts
+++ b/src/views/common/org/org.data.ts
@@ -147,6 +147,35 @@ export const formSchema: FormSchema[] = [
},
required: true
},
+ {
+ field: 'mapOrientation',
+ label: '图片旋转值',
+ component: 'InputNumber',
+ componentProps: {
+ style: { width:'100%' },
+ min: 0
+ }
+ },
+ {
+ field: 'mapLng',
+ label: '位置经度值',
+ component: 'InputNumber',
+ componentProps: {
+ style: { width:'100%' },
+ min: 0
+ },
+ required: true
+ },
+ {
+ field: 'mapLat',
+ label: '位置纬度值',
+ component: 'InputNumber',
+ componentProps: {
+ style: { width:'100%' },
+ min: 0
+ },
+ required: true
+ },
{
field: 'contactName',
label: '联系人名称',
@@ -184,7 +213,8 @@ export const formSchema: FormSchema[] = [
initFetchParams: {
parentId: '0'
}
- }
+ },
+ required: true
},
{
field: 'detailAddress',
diff --git a/src/views/system/user/user.data.ts b/src/views/system/user/user.data.ts
index f7d8299..3dd0ee5 100644
--- a/src/views/system/user/user.data.ts
+++ b/src/views/system/user/user.data.ts
@@ -267,6 +267,21 @@ export const userFormSchema: FormSchema[] = [
span: 12
}
},
+ {
+ field: 'mapOrientation',
+ label: '图片旋转值',
+ component: 'InputNumber',
+ defaultValue: 0,
+ componentProps: {
+ style: { width:'100%' },
+ min: 0
+ },
+ colProps: {
+ span: 12
+ },
+ ifShow: ({ values }) => values.userType === '1',
+ required: true,
+ },
{
label: '备注',
field: 'remarks',