diff --git a/src/assets/images/tuple.png b/src/assets/images/tuple.png new file mode 100644 index 00000000..a3a7b740 Binary files /dev/null and b/src/assets/images/tuple.png differ 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 = '修改设备类型'; });