commit
						0a4f9898cb
					
				|  | @ -21,14 +21,8 @@ | ||||||
|           <el-table-column v-if="MFOLDER_ID !='0'" label="文件名"> |           <el-table-column v-if="MFOLDER_ID !='0'" label="文件名"> | ||||||
|             <template slot-scope="{row}"> |             <template slot-scope="{row}"> | ||||||
|               {{ row.NAME }} |               {{ 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> |             </template> | ||||||
|           </el-table-column> |           </el-table-column> | ||||||
|           <!--          <el-table-column prop="FILESIZE" label="文件大小" />--> |  | ||||||
|           <el-table-column v-if="MFOLDER_ID !='0'" label="文件大小"> |           <el-table-column v-if="MFOLDER_ID !='0'" label="文件大小"> | ||||||
|             <template slot-scope="{row}"> |             <template slot-scope="{row}"> | ||||||
|               {{ row.FILESIZE > 1024 ? ((((row.FILESIZE)/1024)+'').substring(0,(((row.FILESIZE)/1024)+'').lastIndexOf('.')+3))+' MB' : row.FILESIZE + ' KB' }} |               {{ 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> | ||||||
|           <el-table-column prop="CTIME" label="上传时间" /> |           <el-table-column prop="CTIME" label="上传时间" /> | ||||||
|           <el-table-column prop="UNAME" 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 prop="REMARKS" label="备注说明" show-overflow-tooltip /> | ||||||
|           <el-table-column label="操作" align="center" width="200"> |           <el-table-column label="操作" align="center" width="200"> | ||||||
|             <template slot-scope="{row}"> |             <template slot-scope="{row}"> | ||||||
|  | @ -81,7 +69,7 @@ | ||||||
|         <el-form-item label="文件名" prop="NAME"> |         <el-form-item label="文件名" prop="NAME"> | ||||||
|           <el-input v-model="form.NAME" placeholder="这里输入名称..." /> |           <el-input v-model="form.NAME" placeholder="这里输入名称..." /> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="附件"> |         <el-form-item label="附件" class="is-required"> | ||||||
|           <span v-if="form.FFILE">{{ form.FFILE.name }}</span> |           <span v-if="form.FFILE">{{ form.FFILE.name }}</span> | ||||||
|           <el-upload |           <el-upload | ||||||
|             :before-upload="beforeFileUpload" |             :before-upload="beforeFileUpload" | ||||||
|  | @ -105,7 +93,7 @@ | ||||||
|     <el-dialog :visible.sync="dialogBatchUpload" title="批量上传文件" width="600px"> |     <el-dialog :visible.sync="dialogBatchUpload" title="批量上传文件" width="600px"> | ||||||
|       <el-form ref="batchUploadForm" :model="form" label-width="110px" style="width: 500px;"> |       <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 |           <el-upload | ||||||
|             ref="batchUpload" |             ref="batchUpload" | ||||||
|  | @ -355,13 +343,14 @@ export default { | ||||||
|     //   return false |     //   return false | ||||||
|     // }, |     // }, | ||||||
|     beforeFileUpload2(file) { |     beforeFileUpload2(file) { | ||||||
|       var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1) |       // var testmsg = file.name.substring(file.name.lastIndexOf('.') + 1) | ||||||
|       const extension = testmsg === 'pdf' |       // const extension = testmsg === 'pdf' | ||||||
|       if (!extension) { |       // if (!extension) { | ||||||
|         this.$confirm(`上传文件只能是pdf格式!`) |       //   this.$confirm(`上传文件只能是pdf格式!`) | ||||||
|       } else { |       // } else { | ||||||
|  |       // | ||||||
|  |       // } | ||||||
|       this.fileList.push(file) |       this.fileList.push(file) | ||||||
|       } |  | ||||||
|       this.$forceUpdate() |       this.$forceUpdate() | ||||||
|       return false |       return false | ||||||
|     }, |     }, | ||||||
|  | @ -496,7 +485,8 @@ export default { | ||||||
|             MFOLDER_ID: id, |             MFOLDER_ID: id, | ||||||
|             FILEPATH: FILEPATH || '' |             FILEPATH: FILEPATH || '' | ||||||
|           } |           } | ||||||
|         ).then(() => { |         ).then((data) => { | ||||||
|  |           if (data.result === 'success') { | ||||||
|             this.$message({ |             this.$message({ | ||||||
|               message: '删除成功', |               message: '删除成功', | ||||||
|               type: 'success' |               type: 'success' | ||||||
|  | @ -506,6 +496,16 @@ export default { | ||||||
|             this.listQuery.page = 1 |             this.listQuery.page = 1 | ||||||
|             this.getDataTree() |             this.getDataTree() | ||||||
|             this.getList(this.MFOLDER_ID) |             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) => { |         }).catch((e) => { | ||||||
|           this.listLoading = false |           this.listLoading = false | ||||||
|         }) |         }) | ||||||
|  | @ -537,6 +537,9 @@ export default { | ||||||
|           REMARKS: '' |           REMARKS: '' | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|  |       this.form.FFILE = [] | ||||||
|  |       this.$forceUpdate() | ||||||
|  |       console.info(this.form) | ||||||
|     }, |     }, | ||||||
|     getDataTree() { |     getDataTree() { | ||||||
|       this.treeLoading = true |       this.treeLoading = true | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue