|
|
|
|
@ -92,46 +92,57 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template #extraFormBottom>-->
|
|
|
|
|
<!-- <div class="xy-table-item">-->
|
|
|
|
|
<!-- <div class="xy-table-item-label">文件 :</div>-->
|
|
|
|
|
<!-- <div class="xy-table-item-content">-->
|
|
|
|
|
<!-- <el-upload-->
|
|
|
|
|
<!-- style="width: 300px"-->
|
|
|
|
|
<!-- ref="upload"-->
|
|
|
|
|
<!-- multiple-->
|
|
|
|
|
<!-- :on-success="-->
|
|
|
|
|
<!-- (response, file, fileList) =>-->
|
|
|
|
|
<!-- successHandle(response, file, fileList, 'file')-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- :before-upload="uploadBefore"-->
|
|
|
|
|
<!-- accept=".rar,.zip,.doc,.docx,.pdf,.jpg,.png,.gif,.mp4,.xls,.xlsx"-->
|
|
|
|
|
<!-- :action="action"-->
|
|
|
|
|
<!-- :file-list="file"-->
|
|
|
|
|
<!-- :auto-upload="false"-->
|
|
|
|
|
<!-- :on-remove="-->
|
|
|
|
|
<!-- (file, fileList) => removeHande(file, fileList, 'file')-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <el-button slot="trigger" size="small" type="primary"-->
|
|
|
|
|
<!-- >选取文件</el-button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <el-button-->
|
|
|
|
|
<!-- style="margin-left: 10px"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="success"-->
|
|
|
|
|
<!-- @click="$refs['upload'].submit()"-->
|
|
|
|
|
<!-- >开始上传</el-button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <div slot="tip" class="el-upload__tip">-->
|
|
|
|
|
<!-- 支持文件格式:.rar .zip .doc .docx .pdf .jpg .png .gif .mp4 .xls-->
|
|
|
|
|
<!-- .xlsx-->
|
|
|
|
|
<!-- <br />单个文件不能超过20M-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </el-upload>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<template #extraFormBottom>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">文件 :</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload
|
|
|
|
|
style="width: 300px"
|
|
|
|
|
ref="upload"
|
|
|
|
|
multiple
|
|
|
|
|
:on-success="
|
|
|
|
|
(response, file, fileList) =>
|
|
|
|
|
successHandle(response, file, fileList, 'file')
|
|
|
|
|
"
|
|
|
|
|
:before-upload="uploadBefore"
|
|
|
|
|
accept=".rar,.zip,.doc,.docx,.pdf,.jpg,.png,.gif,.mp4,.xls,.xlsx"
|
|
|
|
|
:action="action"
|
|
|
|
|
:file-list="file"
|
|
|
|
|
:auto-upload="false"
|
|
|
|
|
:on-remove="
|
|
|
|
|
(file, fileList) => removeHande(file, fileList, 'file')
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<el-button slot="trigger" size="small" type="primary"
|
|
|
|
|
>选取文件</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
style="margin-left: 10px"
|
|
|
|
|
size="small"
|
|
|
|
|
type="success"
|
|
|
|
|
@click="$refs['upload'].submit()"
|
|
|
|
|
>开始上传</el-button
|
|
|
|
|
>
|
|
|
|
|
<div slot="tip" class="el-upload__tip">
|
|
|
|
|
支持文件格式:.rar .zip .doc .docx .pdf .jpg .png .gif .mp4 .xls
|
|
|
|
|
.xlsx
|
|
|
|
|
<br />单个文件不能超过20M
|
|
|
|
|
</div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">文件地址 :</div>
|
|
|
|
|
<div class="xy-table-item-content" style="width: 300px">
|
|
|
|
|
<div v-for="item in file">
|
|
|
|
|
<Tag color="success">{{ item.response ? item.response.original_name : '' }}</Tag>
|
|
|
|
|
<el-link @click="copyText(item.response ? item.response.url : '')">{{ item.response ? item.response.url : '' }}</el-link>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -226,6 +237,22 @@ export default {
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
copyText (text) {
|
|
|
|
|
const input = document.createElement("input");
|
|
|
|
|
input.setAttribute("readonly", "readonly"); // 设置为只读, 防止在 ios 下拉起键盘
|
|
|
|
|
input.value = text;
|
|
|
|
|
document.body.appendChild(input);
|
|
|
|
|
input.setSelectionRange(0, 9999); // 防止 ios 下没有全选内容而无法复制
|
|
|
|
|
input.select();
|
|
|
|
|
document.execCommand("copy");
|
|
|
|
|
document.body.removeChild(input);
|
|
|
|
|
this.$message({
|
|
|
|
|
type: "success",
|
|
|
|
|
message: `已复制:${input.value}`,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getDetail() {
|
|
|
|
|
const res = await detail(this.id);
|
|
|
|
|
this.$integrateData(this.form, res);
|
|
|
|
|
|