| | |
| | | <el-main style="background-color: #fff;margin-top: 5%;"> |
| | | <el-row v-for="(data, index) in filesUploadData" :key="index"> |
| | | <template v-for="(node, nodeIndex) in data.node"> |
| | | <el-col v-if="node.isUpload === false" :key="node.filesid" :span="3"> |
| | | <el-col v-if="node.isUpload === false" :key="node.accessoryid" :span="3"> |
| | | <el-card |
| | | shadow="never" |
| | | @click.native="clickCard(index * 8 + nodeIndex)" |
| | | > |
| | | <img |
| | | <el-image |
| | | v-if="'tif,bmp,jpg,png,gif'.indexOf(node.filesformat) == -1" |
| | | :src="showFileImg(node.filesformat)" |
| | | class="uploading-image" |
| | | > |
| | | <el-tooltip class="item" effect="dark" :content="node.filesname" placement="bottom"> |
| | | :preview-src-list="srcList" |
| | | @click="clickImg(node)" |
| | | /> |
| | | <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;text-align: center"> |
| | | <el-checkbox v-model="checkedArr[index * 8 + 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 * 8 + nodeIndex].isChecked" |
| | | class="myRedCheckBox" |
| | | >{{ node.filesname }} |
| | | <el-image |
| | | style="width: 100px; height: 80px;margin-top: -10px;" |
| | | :src="getImg+node.accessoryid" |
| | | :preview-src-list="srcList" |
| | | @click="clickImg(node)" |
| | | /> |
| | | <el-checkbox v-model="checkedArr[index * 8 + nodeIndex].isChecked" class="myRedCheckBox"> |
| | | {{ node.filesid }} |
| | | {{ node.filesname }} |
| | | </el-checkbox> |
| | | </div> |
| | | </el-tooltip> |
| | |
| | | empStatus: 0, |
| | | version: '' |
| | | }, |
| | | srcList: [], |
| | | getImg: pages.getAccessoryImage, |
| | | resignForm: { |
| | | resignId: '', |
| | | empId: '', |
| | |
| | | }, |
| | | showFileImg(type) { |
| | | switch (type) { |
| | | case 'xls': |
| | | return require('../../assets/uploading/xls.png') |
| | | case 'xlsx': |
| | | return require('../../assets/uploading/xls.png') |
| | | case 'txt': |
| | | return require('../../assets/uploading/txt.png') |
| | | case 'apk': |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | clickImg(node) { |
| | | this.srcList = [] |
| | | if ('tif,bmp,jpg,png,gif'.indexOf(node.filesformat) >= 0) { |
| | | this.srcList.push(this.getImg + node.accessoryid) |
| | | } |
| | | }, |
| | | delFile() { |
| | |
| | | this.checkedArr = [] |
| | | this.$get('hr/empAccessory', { ...params }).then(r => { |
| | | r.data.data.forEach((v, i) => { |
| | | debugger |
| | | this.checkedArr.push({ isChecked: false, accessoryid: v.accessoryid }) |
| | | // 一行8个 等于8就换行 |
| | | if (i % 8 === 0 && i !== 0) { |