|
|
@ -1,7 +1,8 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<anji-crud ref="listPage" :option="crudOption">
|
|
|
|
<anji-crud ref="listPage" :option="crudOption">
|
|
|
|
<template v-slot:buttonLeftOnTable>
|
|
|
|
<template v-slot:buttonLeftOnTable>
|
|
|
|
<el-upload class="el-upload" ref="upload" :action="uploadUrl" :headers="headers" :on-success="handleUpload" :on-error="handleError" :show-file-list="false" :limit="1">
|
|
|
|
<el-upload class="el-upload" ref="upload" :action="uploadUrl" :headers="headers" :on-success="handleUpload"
|
|
|
|
|
|
|
|
:on-error="handleError" :show-file-list="false" :limit="1">
|
|
|
|
<el-button type="primary" icon="el-icon" v-permission="'fileManage:upload'">文件上传</el-button>
|
|
|
|
<el-button type="primary" icon="el-icon" v-permission="'fileManage:upload'">文件上传</el-button>
|
|
|
|
</el-upload>
|
|
|
|
</el-upload>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -15,6 +16,7 @@
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {fileList, fileAdd, fileDel, fileUpdate, fileDetail} from '@/api/file'
|
|
|
|
import {fileList, fileAdd, fileDel, fileUpdate, fileDetail} from '@/api/file'
|
|
|
|
import {getToken} from '@/utils/auth'
|
|
|
|
import {getToken} from '@/utils/auth'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'File',
|
|
|
|
name: 'File',
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
@ -163,7 +165,8 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
created() {},
|
|
|
|
created() {
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
// 上传成功的回调
|
|
|
|
// 上传成功的回调
|
|
|
|
handleUpload(response, file, fileList) {
|
|
|
|
handleUpload(response, file, fileList) {
|
|
|
|