| | |
| | | </el-col> |
| | | </el-row> |
| | | <el-container style="background-color: #fff;"> |
| | | <el-aside width="210px" style="background-color: #fff;text-align: center;"> |
| | | <el-aside width="210px" style="background-color: #fff;text-align: center;height: 100%;"> |
| | | <el-button class="add-folder-but" @click="dialogFormVisible = true">新增</el-button> |
| | | <el-popconfirm title="是否删除目录?" @onConfirm="delFolder()"> |
| | | <el-button slot="reference" class="pri-del-btn" type="primary">删除</el-button> |
| | |
| | | rules: { |
| | | foldername: [ |
| | | { required: true, message: '请输入文件夹名称', trigger: 'blur' }, |
| | | { min: 3, max: 10, message: '长度在 3 到 10 个字符', trigger: 'blur' } |
| | | { min: 3, max: 20, message: '长度在 3 到 20 个字符', trigger: 'blur' } |
| | | ], |
| | | fileName: [ |
| | | { required: true, message: '请输入文件名称', trigger: 'blur' }, |
| | | { min: 3, max: 10, message: '长度在 3 到 20 个字符', trigger: 'blur' } |
| | | { min: 3, max: 20, message: '长度在 3 到 20 个字符', trigger: 'blur' } |
| | | ], |
| | | sort: [{ required: true, message: '请输入排序', type: 'number', trigger: 'blur' }] |
| | | }, |
| | |
| | | checkAll: false, |
| | | activities: [], |
| | | filesUploadData: [], |
| | | updateNum: 0 |
| | | updateNum: 0, |
| | | folderid: '' |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.folderform.folderid = data.id |
| | | // eslint-disable-next-line no-unused-vars |
| | | var params = {} |
| | | this.folderid = data.id |
| | | params = { |
| | | folderid: data.id, |
| | | filesname: this.fileName |
| | |
| | | }, |
| | | delFolder() { |
| | | // 生成查询文件的条件 |
| | | var params = { folderid: this.activities[this.beforeIndex].id } |
| | | var params = { folderid: this.folderid } |
| | | this.$delete('hr/folder', { ...params }).then(() => { |
| | | this.dialogFormVisible = false |
| | | this.$message({ |
| | |
| | | switch (type) { |
| | | case 'txt': |
| | | return require('../../assets/uploading/txt.png') |
| | | case 'xls': |
| | | return require('../../assets/uploading/xls.png') |
| | | case 'xlsx': |
| | | return require('../../assets/uploading/xls.png') |
| | | case 'apk': |
| | | return require('../../assets/uploading/apk.png') |
| | | case 'csv': |
| | |
| | | return require('../../assets/uploading/tif.png') |
| | | case 'wps': |
| | | return require('../../assets/uploading/wps.png') |
| | | default: |
| | | return require('../../assets/uploading/unknown.png') |
| | | } |
| | | }, |
| | | beforeAvatarUpload(file) { |
| | |
| | | this.fileDate.folderid = this.folderform.folderid |
| | | } |
| | | |
| | | const isLt50M = file.size / 1024 / 1024 < 50 |
| | | const isLt50M = file.size / 1024 / 1024 < 200 |
| | | if (!isLt50M) { |
| | | this.$message.error('上传文件不能超过 50MB!') |
| | | this.$message.error('上传文件不能超过 200MB!') |
| | | } |
| | | return isLt50M |
| | | }, |
| | |
| | | width: 100px; |
| | | height: 100px; |
| | | } |
| | | |
| | | .zs-main { |
| | | .el-tree .el-tree-node__content{ |
| | | font-size:16px; |
| | | color: #333; |
| | | height: 35px; |
| | | line-height: 35px; |
| | | } |
| | | .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content { |
| | | background-color: #e8f2fd; |
| | | border-radius: 4px; |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .el-main { |