|
@@ -18,7 +18,10 @@
|
|
@size-change="sizeChange"
|
|
@size-change="sizeChange"
|
|
@refresh-change="refreshChange"
|
|
@refresh-change="refreshChange"
|
|
@on-load="onLoad"
|
|
@on-load="onLoad"
|
|
- @tree-load="treeLoad">
|
|
|
|
|
|
+ @tree-load="treeLoad"
|
|
|
|
+ :uploadExceed="uploadExceed"
|
|
|
|
+ :upload-preview="uploadPreview"
|
|
|
|
+ >
|
|
<template slot="menuLeft">
|
|
<template slot="menuLeft">
|
|
<el-button type="danger"
|
|
<el-button type="danger"
|
|
size="small"
|
|
size="small"
|
|
@@ -52,6 +55,14 @@
|
|
<i :class="row.source"/>
|
|
<i :class="row.source"/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template slot="excelUrl" slot-scope="scope" >
|
|
|
|
+
|
|
|
|
+ <el-link type="primary" :href="scope.row.excelUrl" target="_blank">
|
|
|
|
+ <avue-text-ellipsis :text="scope.row.excelUrl" :height="100" >
|
|
|
|
+ <small slot="more">...</small>
|
|
|
|
+ </avue-text-ellipsis>
|
|
|
|
+ </el-link>
|
|
|
|
+ </template>
|
|
</avue-crud>
|
|
</avue-crud>
|
|
</basic-container>
|
|
</basic-container>
|
|
</template>
|
|
</template>
|
|
@@ -288,6 +299,7 @@
|
|
propsHttp: {
|
|
propsHttp: {
|
|
url:'data'
|
|
url:'data'
|
|
},
|
|
},
|
|
|
|
+ limit:1,
|
|
tip: '只能上传MP4格式,且不能用QQ录屏,推荐使用win10自带录屏录制,文件大小限制50兆',
|
|
tip: '只能上传MP4格式,且不能用QQ录屏,推荐使用win10自带录屏录制,文件大小限制50兆',
|
|
// tip: '只能上传jpg/png用户头像,且不超过500kb',
|
|
// tip: '只能上传jpg/png用户头像,且不超过500kb',
|
|
action: "/api/blade-resource/oss/endpoint/put-file2"
|
|
action: "/api/blade-resource/oss/endpoint/put-file2"
|
|
@@ -297,13 +309,29 @@
|
|
prop: 'excelUrl',
|
|
prop: 'excelUrl',
|
|
type: 'upload',
|
|
type: 'upload',
|
|
span: 12,
|
|
span: 12,
|
|
|
|
+ multiple:false,
|
|
|
|
+ dataType: "string",
|
|
loadText: '模板上传中,请稍等',
|
|
loadText: '模板上传中,请稍等',
|
|
propsHttp: {
|
|
propsHttp: {
|
|
- url:'data'
|
|
|
|
|
|
+ url:'data',
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ limit:1,
|
|
tip: '上传文档说明',
|
|
tip: '上传文档说明',
|
|
action: "/api/blade-resource/oss/endpoint/upload-file2"
|
|
action: "/api/blade-resource/oss/endpoint/upload-file2"
|
|
},
|
|
},
|
|
|
|
+ // {
|
|
|
|
+ // label: "文档信息",
|
|
|
|
+ // prop: "excelUrl",
|
|
|
|
+ // type: "url",
|
|
|
|
+ // span: 24,
|
|
|
|
+ // minRows: 2,
|
|
|
|
+ // propsHttp: {
|
|
|
|
+ // url:'data'
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ // },
|
|
]
|
|
]
|
|
},
|
|
},
|
|
data: []
|
|
data: []
|
|
@@ -359,6 +387,18 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ uploadExceed(limit, files, fileList, column){
|
|
|
|
+ this.$message.warning('只允许上传1个文件,请先删除原文件再次点击上传')
|
|
|
|
+ },
|
|
|
|
+ //上传后进行点击预览
|
|
|
|
+ uploadPreview(file, column, done) {
|
|
|
|
+ //默认执行打开方法
|
|
|
|
+ window.open(file.url, 'baidu').then(()=>{
|
|
|
|
+ done();
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
initData() {
|
|
initData() {
|
|
getMenuTree().then(res => {
|
|
getMenuTree().then(res => {
|
|
const column = this.findObject(this.option.column, "parentId");
|
|
const column = this.findObject(this.option.column, "parentId");
|