From bb0d2d3b8fb1b7fc591a40237333b70f71013aa6 Mon Sep 17 00:00:00 2001 From: wangxiang <1827945911@qq.com> Date: Mon, 29 Aug 2022 06:29:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=9C=B0=E5=9B=BE=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AMap/src/AMapDesigner/index.vue | 24 ++++--- src/components/AMap/src/amap.data.ts | 66 +++++++------------ .../AMap/src/components/TaskModal.vue | 6 +- 3 files changed, 43 insertions(+), 53 deletions(-) diff --git a/src/components/AMap/src/AMapDesigner/index.vue b/src/components/AMap/src/AMapDesigner/index.vue index 9f3b64a..40c2b91 100644 --- a/src/components/AMap/src/AMapDesigner/index.vue +++ b/src/components/AMap/src/AMapDesigner/index.vue @@ -3,28 +3,32 @@
+ :arrowPointAtCenter="true" + > 保存 + :arrowPointAtCenter="true" + > 任务 + :arrowPointAtCenter="true" + > 标记点 + :arrowPointAtCenter="true" + > @@ -34,14 +38,16 @@ + :arrowPointAtCenter="true" + > + :arrowPointAtCenter="true" + > @@ -97,9 +103,9 @@ import { listHospital } from '/@/api/platform/common/controller/hospital'; import { listUser } from '/@/api/platform/system/controller/user'; import { listOrg } from '/@/api/platform/common/controller/org'; - import AButton from "/@/components/Button/src/BasicButton.vue"; + import AButton from '/@/components/Button/src/BasicButton.vue'; import { Icon } from '/@/components/Icon'; - import { useUserStore } from "/@/store/modules/user"; + import { useUserStore } from '/@/store/modules/user'; import { split, divide, subtract } from 'lodash-es'; import componentSetting from '/@/settings/componentSetting'; @@ -240,7 +246,7 @@ mapOrientation: item.mapOrientation, mapLat: item.mapLat, mapLng: item.mapLng - })) + })); }); // 初始化高德地图组件 AMapLoader.load({ diff --git a/src/components/AMap/src/amap.data.ts b/src/components/AMap/src/amap.data.ts index 8c33e40..3081179 100644 --- a/src/components/AMap/src/amap.data.ts +++ b/src/components/AMap/src/amap.data.ts @@ -100,57 +100,41 @@ export const taskColumns: BasicColumn[] = [ /** 表格任务预设列 */ export const taskPresetColumns: BasicColumn[] = [ { - title: '起始预设点', - dataIndex: 'smallHospitalId', + title: '医院', + dataIndex: 'hospitalId', editRow: true, editRule: true, - editComponent: 'Select', + editComponent: 'ApiSelect', editComponentProps: { - options: [ - { - label: 'Option1', - value: '1' - }, - { - label: 'Option2', - value: '2' - }, - { - label: 'Option3', - value: '3' - } - ] + api: listHospital, + params: { size: 40 }, + labelField: 'name', + valueField: 'id', + resultField: 'data' } }, { title: '目的地预设点', - dataIndex: 'largeHospitalId', - editRow: true, - editRule: true, - editComponent: 'Select', - editComponentProps: { - 'options': [ - { - 'label': 'Option1', - 'value': '1' - }, - { - 'label': 'Option2', - 'value': '2' - }, - { - 'label': 'Option3', - 'value': '3' - } - ] - } + dataIndex: 'orgId', }, { - // todo: 后做 title: '上传文件', - dataIndex: 'file' + dataIndex: 'fileId', + editRow: true, + editComponent: 'Upload', + editComponentProps: { + multiple: true, + maxSize: 20, + maxNumber: 10, + showUploadSaveBtn: true, + showPreviewNumber: false, + emptyHidePreview: true, + api: commonUpload, + accept: ['image/*'] + } }, - { + // todo: 第二版功能 + /*{ title: '要求时间', dataIndex: 'timeRequired', editRow: true, @@ -159,7 +143,7 @@ export const taskPresetColumns: BasicColumn[] = [ valueFormat: 'YYYY-MM-DD', format: 'YYYY-MM-DD', } - } + }*/ ]; export const formMutualTaskSettingColumns: BasicColumn[] = [ diff --git a/src/components/AMap/src/components/TaskModal.vue b/src/components/AMap/src/components/TaskModal.vue index e6d92d2..77ac1f3 100644 --- a/src/components/AMap/src/components/TaskModal.vue +++ b/src/components/AMap/src/components/TaskModal.vue @@ -89,7 +89,7 @@ slots: { customRender: 'action' }, } }); - const [schemeRegisterTable, { reload: schemeReload, getDataSource: getMutualDataSource, setProps }] = useTable({ + const [schemeRegisterTable, { reload: schemeReload, getDataSource: getTaskPresetDataSource, setProps }] = useTable({ title: '交接任务', columns: taskPresetColumns, pagination: { @@ -121,9 +121,9 @@ /** 处理任务新增 */ function handleMutualTaskAdd() { - getMutualDataSource().push({ + getTaskPresetDataSource().push({ hospitalId: '', - orgId: '', + orgId: '等待收样员设置!', fileId: [] }); }