ruoyi-ui/src/views/bignote/familyeventInfo.vue
@@ -91,17 +91,48 @@
        :file-list="fileListOther"
        class="upload-demo"
        multiple
        :on-preview="handlePreview"
        list-type="picture-card"
        :on-preview="handleFileCardPreview"
        :on-remove="handleRemove"
        :http-request="requestUpload"
        :show-file-list="true"
      >
        <el-button type="primary">Click to upload</el-button>
        <template #tip>
          <div class="el-upload__tip">
          <i slot="default" class="el-icon-plus"></i>
          <div slot="file" slot-scope="{file}">
            <img
              class="el-upload-list__item-thumbnail"
              src="../../assets/401_images/401.gif"
              alt=""
              style="width: 147px; height: 147px"
              fit="cover"
            >
            <span class="el-upload-list__item-actions">
            <span
              class="el-upload-list__item-preview"
              @click="handleFileCardPreview(file)"
            >
              <i class="el-icon-zoom-in"></i>
            </span>
            <span
v-if="!disabled"
              @click="handleRemove(file)"
              class="el-upload-list__item-delete"
            >
              <i class="el-icon-download"></i>
            </span>
            <span
              v-if="!disabled"
              class="el-upload-list__item-delete"
              @click="handleRemove(file)"
            >
              <i class="el-icon-delete"></i>
            </span>
          </span>
          </div>
        </template>
      </el-upload>
@@ -114,8 +145,14 @@
    <el-dialog  :visible.sync="dialogVisible">
      <img w-full :src="dialogImageUrl" alt="Preview Image" />
    </el-dialog>
    <el-dialog  :visible.sync="dialogFileVisible">
      <a :href="desurl">显示</a>
      <iframe :src="desurl"</iframe>
    </el-dialog>
  </div>
</template>
<script>
import {getFamilyeventInfo, updateFamilyevent, uploadPic, download} from "@/api/bignote/index";
import {addRole, updateRole} from "@/api/system/role";
@@ -130,7 +167,7 @@
    return {
      cdi:"家庭大事记信息",
      udi:"家庭大事记修改",
      fot:[".jpg",".jif"],
      fot:[".jpg",".jif",".png"],
      fileList:[
      ],
      fileListOther:[
@@ -148,7 +185,10 @@
        remark: undefined,
        url: undefined,
      },
      desurl:'',
      dialogImageUrl: '',
      dialogFileUrl: '',
      dialogFileVisible:false,
      dialogVisible: false,
      disabled: false,
      rules: {
@@ -298,10 +338,24 @@
      })
    },
    handleRemoveFile(file) {
      alert(23)
      for(let i = 0; i < this.fileListOther.length; i++)
      {
        if(this.fileListOther[i].url==file.url)
          this.$delete(this.fileListOther,i);
      }
    },
    handleRemove(file) {
      alert(323)
      for(let i = 0; i < this.fileList.length; i++)
      {
        if(this.fileList[i].url==file.url)
          this.$delete(this.fileList,i);
      }
    },
    handleFileCardPreview(file){
      this.dialogFileUrl = file.url;
      const Base64 = require('js-base64').Base64
      this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
      myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;