1.安监部体系文件bug修改
parent
a983264050
commit
e2517f8065
|
@ -21,14 +21,8 @@
|
|||
<el-table-column v-if="MFOLDER_ID !='0'" label="文件名">
|
||||
<template slot-scope="{row}">
|
||||
{{ row.NAME }}
|
||||
<a v-show="row.extension_name == '.txt'" style="color: #1e9fff" @click="goViewTxt(row.FILEPATH)">[预览]</a>
|
||||
<a v-show="row.extension_name == '.pdf'" style="color: #1e9fff" @click="goViewPdf(row.FILEPATH)">[预览]</a>
|
||||
<a v-show="row.extension_name == '.mp4'" style="color: #1e9fff" @click="goViewVideo(row.FILEPATH)">[预览]</a>
|
||||
<a v-show="row.extension_name == '.doc' || row.extension_name == '.xls' || row.extension_name == '.ppt' || row.extension_name == '.docx' || row.extension_name == '.xlsx' || row.extension_name == '.pptx'" style="color: #1e9fff" @click="goOffice(row.FILEPATH)">[下載]</a>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="FILESIZE" label="文件大小" />-->
|
||||
<el-table-column v-if="MFOLDER_ID !='0'" label="文件大小">
|
||||
<template slot-scope="{row}">
|
||||
{{ row.FILESIZE > 1024 ? ((((row.FILESIZE)/1024)+'').substring(0,(((row.FILESIZE)/1024)+'').lastIndexOf('.')+3))+' MB' : row.FILESIZE + ' KB' }}
|
||||
|
@ -36,12 +30,6 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="CTIME" label="上传时间" />
|
||||
<el-table-column prop="UNAME" label="上传者" />
|
||||
<!-- <el-table-column label="是否共享">-->
|
||||
<!-- <template slot-scope="{row}">-->
|
||||
<!-- <span v-if="row.SHARE=='no'">私有文件</span>-->
|
||||
<!-- <span v-else>公共文件</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="REMARKS" label="备注说明" show-overflow-tooltip />
|
||||
<el-table-column label="操作" align="center" width="200">
|
||||
<template slot-scope="{row}">
|
||||
|
@ -81,7 +69,7 @@
|
|||
<el-form-item label="文件名" prop="NAME">
|
||||
<el-input v-model="form.NAME" placeholder="这里输入名称..." />
|
||||
</el-form-item>
|
||||
<el-form-item label="附件">
|
||||
<el-form-item label="附件" class="is-required">
|
||||
<span v-if="form.FFILE">{{ form.FFILE.name }}</span>
|
||||
<el-upload
|
||||
:before-upload="beforeFileUpload"
|
||||
|
@ -105,7 +93,7 @@
|
|||
<el-dialog :visible.sync="dialogBatchUpload" title="批量上传文件" width="600px">
|
||||
<el-form ref="batchUploadForm" :model="form" label-width="110px" style="width: 500px;">
|
||||
|
||||
<el-form-item label="附件">
|
||||
<el-form-item label="附件" class="is-required">
|
||||
|
||||
<el-upload
|
||||
ref="batchUpload"
|
||||
|
@ -355,13 +343,14 @@ export default {
|
|||
// return false
|
||||
// },
|
||||
beforeFileUpload2(file) {
|
||||
var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
|
||||
const extension = testmsg === 'pdf'
|
||||
if (!extension) {
|
||||
this.$confirm(`上传文件只能是pdf格式!`)
|
||||
} else {
|
||||
this.fileList.push(file)
|
||||
}
|
||||
// var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1)
|
||||
// const extension = testmsg === 'pdf'
|
||||
// if (!extension) {
|
||||
// this.$confirm(`上传文件只能是pdf格式!`)
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
this.fileList.push(file)
|
||||
this.$forceUpdate()
|
||||
return false
|
||||
},
|
||||
|
@ -496,16 +485,27 @@ export default {
|
|||
MFOLDER_ID: id,
|
||||
FILEPATH: FILEPATH || ''
|
||||
}
|
||||
).then(() => {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getDataTree()
|
||||
this.getList(this.MFOLDER_ID)
|
||||
).then((data) => {
|
||||
if (data.result === 'success') {
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getDataTree()
|
||||
this.getList(this.MFOLDER_ID)
|
||||
}else{
|
||||
if (data.msg) {
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
this.listLoading = false
|
||||
this.varList = []
|
||||
this.listQuery.page = 1
|
||||
this.getDataTree()
|
||||
this.getList(this.MFOLDER_ID)
|
||||
}
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
|
@ -537,6 +537,9 @@ export default {
|
|||
REMARKS: ''
|
||||
}
|
||||
}
|
||||
this.form.FFILE = []
|
||||
this.$forceUpdate()
|
||||
console.info(this.form)
|
||||
},
|
||||
getDataTree() {
|
||||
this.treeLoading = true
|
||||
|
|
Loading…
Reference in New Issue