From f60a46ed1df05d8b5e2f24c0ec5a698f13c2bb59 Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 16 Oct 2023 13:35:43 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E8=AE=BE=E5=A4=87=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 4 +- .../equipment/components/AssetsUpload.vue | 236 +++++++++--- .../equipment/components/EquipmentDrawer.vue | 88 ++++- .../components/EquipmentInfoForm.vue | 337 ++++++++++++++++++ src/views/core/base/equipment/index.vue | 5 + 5 files changed, 599 insertions(+), 71 deletions(-) create mode 100644 src/views/core/base/equipment/components/EquipmentInfoForm.vue diff --git a/.env.dev b/.env.dev index 40051292..574a759f 100644 --- a/.env.dev +++ b/.env.dev @@ -12,9 +12,9 @@ ENV = 'development' VUE_APP_TITLE = 产线监控系统 # 芋道管理系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.1.49:48080' +# VUE_APP_BASE_API = 'http://192.168.1.49:48080' # VUE_APP_BASE_API = 'http://192.168.1.8:48080' -# VUE_APP_BASE_API = 'http://192.168.0.33:48080' +VUE_APP_BASE_API = 'http://192.168.0.33:48080' # VUE_APP_BASE_API = 'http://192.168.1.188:48080' # 路由懒加载 diff --git a/src/views/core/base/equipment/components/AssetsUpload.vue b/src/views/core/base/equipment/components/AssetsUpload.vue index c6453eac..c6d410e5 100644 --- a/src/views/core/base/equipment/components/AssetsUpload.vue +++ b/src/views/core/base/equipment/components/AssetsUpload.vue @@ -13,21 +13,31 @@ 展开 -
+
- +
将文件拖到此处或 点击上传
- - some tips.... + {{ + isPicMode ? '仅支持上传 .jpg .png 格式文件, 且' : '' + }}文件大小不超过2MB
+ + + + + + diff --git a/src/views/core/base/equipment/index.vue b/src/views/core/base/equipment/index.vue index 6ec5e6ae..16c881d8 100644 --- a/src/views/core/base/equipment/index.vue +++ b/src/views/core/base/equipment/index.vue @@ -53,6 +53,7 @@ v-if="editVisible" ref="drawer" :mode="editMode" + @update-mode="editMode = $event" :data-id="form.id" :sections="[ { @@ -462,6 +463,8 @@ export default { label: '上传资料', fieldName: 'assets', subcomponent: AssetsUpload, + prop: 'uploadedAssets', + default: [], bind: { 'is-pic-mode': false, }, @@ -474,6 +477,8 @@ export default { label: '上传图片', fieldName: 'images', subcomponent: AssetsUpload, + // prop: '', + // default: [], bind: { 'is-pic-mode': true, },