From 32cbf9076f5955b81beeb139ef1f8df1f3db1360 Mon Sep 17 00:00:00 2001 From: lb Date: Mon, 16 Oct 2023 17:03:29 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=9B=B4=E6=96=B0=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/images/tuple.png | Bin 0 -> 944 bytes src/components/DialogForm/index.vue | 196 ++++++++++++++++---- src/views/core/base/equipmentType/index.vue | 49 ++--- 3 files changed, 182 insertions(+), 63 deletions(-) create mode 100644 src/assets/images/tuple.png diff --git a/src/assets/images/tuple.png b/src/assets/images/tuple.png new file mode 100644 index 0000000000000000000000000000000000000000..a3a7b740b12d58cb71832bad0290910b1f01cdf2 GIT binary patch literal 944 zcmV;h15f;kP)Px&YDq*vR7gv;)>)|TQy9nb&oR$aWQff3P$)x&P?QTIL)^KLA;ZNnM}|zH$UKCi zkRgtwxFPe<5rqp}C~{24OfHQ5cF#I3|NiHF&wF9jZtwqIYdzn!p5gbbd1fD5;Y@sp z`)1ufZ^jMV;3BMwPjK0c`^^H}78e$5F|Ne7{}*t(f~``Jzyh6lEXxgdzy(+t-_*^% z>qu+k5bTBxuskxK7{7!?{i&t_cf|Px`wCa#`_91OIKJk`Zu<|O$HVwD3nl?~!g(Dm zZv3IFX5Yy;xW0eFTlf@zU<>StjcfjW+z{x}fIAm#rE{s7U;)!KQ(;WOdY=i|pFm-lG!9GXa_;Uw41N+u@Kmji6I0=X0;|5%>07>y7ENLDo z+qZos%IamkG?t~$zwz|O*6wfj*#Jp$XlYBj=e1wIg;b!THAEDYpm9EUF}JDWR__NUdx zhw$tOY*MYZ<(uLfq)hG!@KWTIIel)?MqHCbdI9&2z$VpdTb??;yo4ZfH$T8zus-g< ztDWIMRx5YEI{@xd!jP07mQN3hQsrQ&!E2+h0p5=U`+B_B8P0;uG0e(Iwc55v=mU$( z6QaBEawY@3xm135!^l#8qK#3LWL^v$Tk#l{PlM&~fkpTOy9=+h$pBOAF_ff8a5Q_yN4!=lhP^dr2QLJi*xO!8+mpF zmYNLg_CblwEe$Y+ZmhqDZtV?b?NCA5d|-KgB&(AkspmIGJhP-9rrkt-ekm8v@>WSE z2bKp`V7FFp9OEqku2aRC-+2>a%H69YQnfqMVKUM$Z%XT#25U(( zT(<^}!lBh0mu4roiU-mc+lyc-bJ8PfE$o3jIdbDQ%hl1u5329AN7YnNTktO*8^ht? SJopR%0000c9~I literal 0 HcmV?d00001 diff --git a/src/components/DialogForm/index.vue b/src/components/DialogForm/index.vue index e55394de..72d7e166 100644 --- a/src/components/DialogForm/index.vue +++ b/src/components/DialogForm/index.vue @@ -48,23 +48,6 @@ :placeholder="`请选择${col.label}`" value-format="timestamp" v-bind="col.bind"> - - - 点击上传 - -
- {{ col.uploadTips || '只能上传jpg/png文件,大小不超过2MB' }} -
-
+ +
+ + + + + + + 上传文件 + +
+ {{ col.uploadTips || '只能上传jpg/png文件, 大小不超过2MB' }} +
+
+ + +
@@ -83,6 +103,9 @@ @@ -309,4 +379,52 @@ export default { .el-select { width: 100%; } + +.upload-area { + // background: #ccc; + // display: grid; + // grid-auto-rows: 34px; + // grid-template-columns: repeat(6, minmax(32px, max-content)); + // gap: 8px; + // align-items: center; + position: relative; + overflow: hidden; + transition: height 0.3s ease-out; +} + +.upload-in-dialog { + // display: inline-block; + margin-right: 24px; + // background: #ccc; + position: relative; + // top: -13px; + float: left; +} + +.close-icon { + // background: #ccc; + position: absolute; + top: 0; + right: 12px; + z-index: 100; + transition: transform 0.3s ease-out; +} + +.close-icon.open { + transform: rotateZ(90deg); +} + + + diff --git a/src/views/core/base/equipmentType/index.vue b/src/views/core/base/equipmentType/index.vue index 6fa94502..c5358201 100644 --- a/src/views/core/base/equipmentType/index.vue +++ b/src/views/core/base/equipmentType/index.vue @@ -37,22 +37,7 @@ @close="cancel" @cancel="cancel" @confirm="submitForm"> - -
-

文件列表

-
-
    -
  • - {{ JSON.stringify(item) }} -
  • -
-
-
    -
  • - {{ JSON.stringify(item) }} -
  • -
-
+ @@ -70,7 +55,7 @@ import { exportEquipmentTypeExcel, } from '@/api/base/equipmentType'; -import { getAccessToken } from '@/utils/auth'; +// import { getAccessToken } from '@/utils/auth'; export default { name: 'EquipmentType', @@ -164,15 +149,13 @@ export default { prop: 'parentId', url: '/base/equipment-type/page?pageNo=1&pageSize=100', }, + {}, + ], + [ { upload: true, label: '上传资料', - prop: 'uploadFiles', - url: process.env.VUE_APP_BASE_API + '/admin-api/infra/file/upload', // 请求地址 - bind: { - headers: { Authorization: 'Bearer ' + getAccessToken() }, - 'show-file-list': false, - }, + prop: 'files', }, ], [{ input: true, label: '备注', prop: 'remark' }], @@ -251,7 +234,25 @@ export default { const id = row.id; getEquipmentType(id).then((response) => { this.form = response.data; - debugger; + // this.form = { + // code: 'SBLX20230925184444000041', + // name: '测试131', + // remark: '测试可删除', + // id: '1706258479729336322', + // files: [ + // { fileName: '1.png', fileUrl: '', fileType: 2 }, + // { fileName: '1.asdfaslkjfkasdf.png', fileUrl: '', fileType: 2 }, + // { fileName: '2.txt', fileUrl: '', fileType: 2 }, + // { fileName: '1.rar', fileUrl: '', fileType: 2 }, + // { fileName: '1.kkk', fileUrl: '', fileType: 2 }, + // { fileName: 'test.file', fileUrl: '', fileType: 2 }, + // { fileName: '222', fileUrl: '', fileType: 2 }, + // { fileName: 'g', fileUrl: '', fileType: 2 }, + // ], + // createTime: 1695638697000, + // parentId: '1701869972319584257', + // }; + // debugger; this.open = true; this.title = '修改设备类型'; });