孔祥富
2021-03-11 7369fd5866a78cde7ecbb4721d9decdfa181fd39
src/views/yunpan/uploadfj.vue
@@ -1,5 +1,5 @@
<template>
  <div class="zs-main">
  <div class="zs-main fj-upload">
    <el-row class="search-title">
      <el-col :span="18" class="title">
        <div class="zs-title">上传附件</div>
@@ -12,15 +12,15 @@
          clearable
          placeholder="请输入文件名"
          show-word-limit
          style="width:200px"
          style="width:280px;margin-right: 10px"
        />
        <el-button type="primary" @click="findFileByFileName()">查询</el-button>
      </el-col>
    </el-row>
    <el-container style="background-color: #fff;">
      <el-aside width="210px" style="background-color: #fff;text-align: center;">
        <h4>{{ rowitem.empName }}:{{ rowitem.deptName }}</h4>
        <el-timeline>
      <el-aside width="210px" style="background-color: #fff;padding: 0 24px;text-align: center;height: 88vh;overflow: auto">
        <span style="font-size: 18px;font-weight: 700;">{{ rowitem.empName }}:{{ rowitem.deptName }}</span>
        <el-timeline style="margin-top: 10px">
          <el-timeline-item
            v-for="(activity, index) in activities"
            :key="index"
@@ -47,14 +47,14 @@
            />提示:文件不要超过10个,单个文件大小不超过50M,单击或者拖动文件到下面区域,支持单个或批量文件的上传。</el-col>
          </el-row>
          <el-row style="background-color: rgba(0,0,0,0.2);">
            <el-col :span="14">
            <el-col :span="16">
              <el-checkbox
                v-model="checkAll"
                class="myRedCheckBox"
                style="color: #000; margin-left: 20px;"
                @change="checkAllMethods()"
              >全选</el-checkbox></el-col>
            <el-col :span="10">
            <el-col :span="8">
              <el-button
                type="primary"
                icon="el-icon-download"
@@ -71,7 +71,6 @@
                <el-button slot="reference" class="hr-but" type="danger">转存</el-button>
              </el-popconfirm>
              <el-button type="warning" @click="openUpdateFileName()">重命名</el-button>
              <el-button type="primary" @click="downloaddialogFormVisible = true">查看</el-button>
            </el-col>
          </el-row>
        </el-header>
@@ -125,11 +124,12 @@
                <el-card
                  shadow="never"
                >
                  <img
                  <el-image
                    :src="showFileImg(node.filesformat)"
                    class="uploading-image"
                    @click="clickCard(index * 8 + nodeIndex)"
                  >
                    :preview-src-list="srcList"
                    @click="clickImg(node)"
                  />
                  <el-tooltip 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-checkbox>
@@ -178,6 +178,8 @@
  },
  data() {
    return {
      srcList: [],
      getImg: pages.getAccessoryImage,
      updateFileNameFormVisible: false,
      file: {
        fileName: ''
@@ -213,6 +215,12 @@
    this.initlabel()
  },
  methods: {
    clickImg(node) {
      this.srcList = []
      if ('tif,bmp,jpg,png,gif'.indexOf(node.filesformat) >= 0) {
        this.srcList.push(this.getImg + node.accessoryid)
      }
    },
    updateFileName(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
@@ -611,12 +619,15 @@
      line-height: 60px;
   }
   .uploading-image {
      width: 100%;
      height: 100%;
      width: 60%;
      height: 60%;
      display: block;
    margin: 0 auto;
   }
}
.fj-upload .el-timeline-item {
  padding-bottom: 1px;
}
.el-timeline-item__timestamp {
   font-size: 15px;
   color: #000;
@@ -648,6 +659,12 @@
.myRedCheckBox .el-checkbox__inner:hover {
   border-color: #a32c30;
}
.myRedCheckBox .el-checkbox__label {
  width: 90%;
  overflow: hidden;
  text-overflow:ellipsis;
  white-space: nowrap;
}
.avatar-uploader .el-upload {
   border: 1px dashed #d9d9d9;