| | |
| | | >确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <el-timeline> |
| | | <el-tree |
| | | ref="deptTree" |
| | | :data="activitiesTree" |
| | | :check-strictly="false" |
| | | accordion |
| | | node-key="id" |
| | | default-expand-all |
| | | :expand-on-click-node="false" |
| | | highlight-current |
| | | :filter-node-method="filterNode" |
| | | @node-click="nodeClick" |
| | | /> |
| | | <!-- <el-timeline> |
| | | <el-timeline-item |
| | | v-for="(activity, index) in activities" |
| | | :key="index" |
| | |
| | | > |
| | | {{ activity.timestamp }}</span> |
| | | </el-timeline-item> |
| | | </el-timeline> |
| | | </el-timeline>--> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-header class="text-header"> |
| | |
| | | shadow="never" |
| | | > |
| | | <el-image |
| | | v-if="'tif,bmp,jpg,png,gif'.indexOf(node.filesformat) == -1" |
| | | :src="showFileImg(node.filesformat)" |
| | | class="uploading-image" |
| | | :preview-src-list="srcList" |
| | | @click="clickImg(node)" |
| | | /> |
| | | <el-tooltip class="item" effect="dark" :content="node.filesname" placement="bottom"> |
| | | <el-tooltip v-if="'tif,bmp,jpg,png,gif'.indexOf(node.filesformat) == -1" class="item" effect="dark" :content="node.filesname" placement="bottom"> |
| | | <div style="padding-top: 14px;"> |
| | | <el-checkbox v-model="checkedArr[index * rowCount + nodeIndex].isChecked" class="myRedCheckBox">{{ node.filesname }}</el-checkbox> |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip v-if="'tif,bmp,jpg,png,gif'.indexOf(node.filesformat) != -1" class="item" effect="dark" :content="node.filesname" placement="bottom"> |
| | | <div style="padding-top: 14px;"> |
| | | <el-checkbox v-model="checkedArr[index * rowCount + nodeIndex].isChecked" class="myRedCheckBox"> |
| | | <el-image |
| | | style="width: 100px; height: 80px" |
| | | :src="getImg+node.filesid" |
| | | :preview-src-list="srcList" |
| | | @click="clickImg(node)" |
| | | /> |
| | | {{ node.filesname }} |
| | | </el-checkbox> |
| | | </div> |
| | | </el-tooltip> |
| | | </el-card> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg', |
| | | activitiesTree: [], |
| | | srcList: [], |
| | | getImg: pages.getFilesUploadImage, |
| | | updateFileNameFormVisible: false, |
| | |
| | | dialogDelVisible: false, |
| | | dialogFormVisible: false, |
| | | folderform: { |
| | | parentId: '', |
| | | folderid: '', |
| | | foldername: '', |
| | | sort: 0 |
| | |
| | | this.initFolder() |
| | | }, |
| | | methods: { |
| | | filterNode(value, data) { |
| | | if (!value) return true |
| | | return data.label.indexOf(value) !== -1 |
| | | }, |
| | | nodeClick(data) { |
| | | this.folderform.parentId = data.parentId |
| | | if (this.folderform.parentId === '0') { |
| | | this.folderform.parentId = null |
| | | } |
| | | this.folderform.sort = data.orderNum |
| | | this.folderform.foldername = data.label |
| | | this.folderform.folderid = data.id |
| | | // eslint-disable-next-line no-unused-vars |
| | | var params = {} |
| | | params = { |
| | | folderid: data.id, |
| | | filesname: this.fileName |
| | | } |
| | | this.initFile(params) |
| | | }, |
| | | clickImg(node) { |
| | | this.srcList = [] |
| | | if ('tif,bmp,jpg,png,gif'.indexOf(node.filesformat) >= 0) { |
| | |
| | | } |
| | | }, |
| | | async initFolder() { |
| | | await this.$get('hr/folder').then(r => { |
| | | await this.$get('hr/folder/treeList').then(r => { |
| | | this.activities = [] |
| | | this.beforeIndex = 0 |
| | | r.data.data.forEach((v, i) => { |
| | | this.activitiesTree = r.data.data.rows |
| | | r.data.data.rows.forEach((v, i) => { |
| | | if (i === 0) { |
| | | this.activities.push({ |
| | | timestamp: v.foldername, |
| | | id: v.folderid, |
| | | timestamp: v.label, |
| | | id: v.id, |
| | | color: '#a32c30' |
| | | }) |
| | | } else { |
| | | this.activities.push({ timestamp: v.foldername, id: v.folderid }) |
| | | this.activities.push({ timestamp: v.label, id: v.id }) |
| | | } |
| | | }) |
| | | }) |
| | |
| | | return require('../../assets/uploading/word.png') |
| | | case 'zip': |
| | | return require('../../assets/uploading/zip.png') |
| | | case 'jpg': |
| | | return require('../../assets/uploading/jpg.png') |
| | | case 'png': |
| | | return require('../../assets/uploading/png.png') |
| | | case 'doc': |
| | |
| | | return require('../../assets/uploading/tif.png') |
| | | case 'wps': |
| | | return require('../../assets/uploading/wps.png') |
| | | default: |
| | | return require('../../assets/uploading/unknown.png') |
| | | } |
| | | }, |
| | | beforeAvatarUpload(file) { |