|
@@ -6,16 +6,37 @@
|
|
v-model:file-list="fileList"
|
|
v-model:file-list="fileList"
|
|
action="#"
|
|
action="#"
|
|
method="post"
|
|
method="post"
|
|
- :data="{profileId: 'xxxx'}"
|
|
|
|
|
|
+ :data="{ profileId: 'xxxx' }"
|
|
multiple
|
|
multiple
|
|
:on-progress="onProgress"
|
|
:on-progress="onProgress"
|
|
:auto-upload="true"
|
|
:auto-upload="true"
|
|
:on-success="onSuccess"
|
|
:on-success="onSuccess"
|
|
- :http-request="submit"
|
|
|
|
- >
|
|
|
|
|
|
+ :http-request="submit">
|
|
<el-button type="primary">Click to upload</el-button>
|
|
<el-button type="primary">Click to upload</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
<el-button @click="submit">上传</el-button>
|
|
<el-button @click="submit">上传</el-button>
|
|
|
|
+
|
|
|
|
+ <div style="padding: 0 12px">
|
|
|
|
+ <div style="display: inline-block; width: 10%">
|
|
|
|
+ <el-card shadow="never"> qweqweqwe </el-card>
|
|
|
|
+ </div>
|
|
|
|
+ <div style="display: inline-block; width: 90%">
|
|
|
|
+ <div style="display: flex; justify-content: flex-end; align-items: center">
|
|
|
|
+ <el-button>确定</el-button>
|
|
|
|
+ <el-button>确定</el-button>
|
|
|
|
+ <el-button>确定</el-button>
|
|
|
|
+ <el-button>确定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <vxe-table round :data="tableData">
|
|
|
|
+ <vxe-column resizable type="seq" width="60"></vxe-column>
|
|
|
|
+ <vxe-column resizable field="name" title="Name"></vxe-column>
|
|
|
|
+ <vxe-column resizable field="sex" title="Sex"></vxe-column>
|
|
|
|
+ <vxe-column resizable field="age" title="Age"></vxe-column>
|
|
|
|
+ </vxe-table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
@@ -26,7 +47,12 @@ import { createCrudOptions } from './crud'
|
|
import { request } from '/@/utils/service'
|
|
import { request } from '/@/utils/service'
|
|
|
|
|
|
import type { UploadProps, UploadUserFile, UploadFile, UploadFiles, UploadProgressEvent } from 'element-plus'
|
|
import type { UploadProps, UploadUserFile, UploadFile, UploadFiles, UploadProgressEvent } from 'element-plus'
|
|
-
|
|
|
|
|
|
+const tableData = ref([
|
|
|
|
+ { id: 10001, name: 'Test1', role: 'Develop', sex: 'Man', age: 28, address: 'test abc' },
|
|
|
|
+ { id: 10002, name: 'Test2', role: 'Test', sex: 'Women', age: 22, address: 'Guangzhou' },
|
|
|
|
+ { id: 10003, name: 'Test3', role: 'PM', sex: 'Man', age: 32, address: 'Shanghai' },
|
|
|
|
+ { id: 10004, name: 'Test4', role: 'Designer', sex: 'Women', age: 24, address: 'Shanghai' },
|
|
|
|
+])
|
|
const fileList = ref<UploadUserFile[]>([])
|
|
const fileList = ref<UploadUserFile[]>([])
|
|
const onProgress = (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
|
const onProgress = (evt: UploadProgressEvent, uploadFile: UploadFile, uploadFiles: UploadFiles) => {
|
|
console.log(evt)
|
|
console.log(evt)
|
|
@@ -39,16 +65,16 @@ const onSuccess = (response: any, uploadFile: UploadFile, uploadFiles: UploadFil
|
|
}
|
|
}
|
|
|
|
|
|
const submit = () => {
|
|
const submit = () => {
|
|
- const formData = new FormData();
|
|
|
|
|
|
+ const formData = new FormData()
|
|
formData.append('file', fileList.value[0].raw)
|
|
formData.append('file', fileList.value[0].raw)
|
|
formData.append('profileId', 'xxxx')
|
|
formData.append('profileId', 'xxxx')
|
|
return request({
|
|
return request({
|
|
url: 'http://127.0.0.1:8003/api/amazon/assets/upload/',
|
|
url: 'http://127.0.0.1:8003/api/amazon/assets/upload/',
|
|
headers: {
|
|
headers: {
|
|
- 'Content-Type': 'multipart/form-data'
|
|
|
|
|
|
+ 'Content-Type': 'multipart/form-data',
|
|
},
|
|
},
|
|
method: 'post',
|
|
method: 'post',
|
|
- data: formData
|
|
|
|
|
|
+ data: formData,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|