Tcsm
2023-05-09 9596bd25e3c95906398149d9325bbeecaa570e20
ruoyi-ui/src/views/collection/collectionInfo.vue
@@ -2,7 +2,7 @@
  <div class="app-container">
    <div class="form-header mt">
      <h4 class="dt h4">收藏与荣誉详细信息 </h4>
      <el-button v-if="isShow" type="primary" class="pt"  icon="el-icon-edit" @click="handleEdit()" >编辑</el-button>
<!--      <el-button v-if="isShow" type="primary" class="pt"  icon="el-icon-edit" @click="handleEdit()" >编辑</el-button>-->
      <!--      <br>-->
      <!--      <el-button type="primary" class="pt"   @click="handleExport"-->
      <!--                 v-hasPermi="['self:user:export']" >导出</el-button>-->
@@ -14,7 +14,7 @@
      <!--                  clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>-->
      <!--      </el-form-item>-->
      <el-form-item label="获得时间" prop="happenTime">
        <el-input v-model="formData.type" placeholder="请输入获得时间" clearable :style="{width: '100%'}" :disabled="dsb">
        <el-input v-model="formData.happenTime" placeholder="请输入获得时间" clearable :style="{width: '100%'}" :disabled="dsb">
        </el-input>
      </el-form-item>
      <el-form-item label="类别" prop="type">
@@ -64,22 +64,23 @@
            fit="cover"
            :preview-src-list="[file.url]"
          >
          <span class="el-upload-list__item-actions">
          <span class="el-upload-list__item-actions" >
        <span
          v-if="isShow"
          class="el-upload-list__item-preview"
          @click="handlePictureCardPreview(file)"
        >
          <i class="el-icon-zoom-in"></i>
        </span>
        <span
          v-if="!disabled"
          v-if="isShow"
          class="el-upload-list__item-delete"
          @click="handleDownload(file.url)"
        >
          <i class="el-icon-download"></i>
        </span>
        <span
          v-if="!disabled"
          v-if="isShow"
          class="el-upload-list__item-delete"
          @click="handleRemove(file)"
        >
@@ -91,7 +92,7 @@
        </div>
      </el-upload>
      <h4 class="form-header">其他附件 </h4>
      <!--<h4 class="form-header">其他附件 </h4>
      <el-upload
        action=""
        :file-list="fileListOther"
@@ -103,17 +104,68 @@
        :http-request="requestUpload"
        :show-file-list="true"
      >
        <el-button type="primary">点击上传</el-button>
        <el-button v-if="isShow" type="primary" >点击上传</el-button>
        <template #tip>
          <div class="el-upload__tip">
          </div>
        </template>
      </el-upload>-->
      <h4 class="form-header">其他附件 </h4>
      <el-upload
        action=""
        :file-list="fileListOther"
        class="upload-demo"
        multiple
        list-type="picture-card"
        :on-preview="handleFileCardPreview"
        :on-remove="handleRemove"
        :http-request="requestUpload"
        :show-file-list="true"
      >
        <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 v-if="isShow"
                  class="el-upload-list__item-preview"
                  @click="handleFileCardPreview(file)"
                >
                  <i class="el-icon-zoom-in"></i>
                </span>
                <span
                  v-if="isShow"
                  @click="handleRemove(file)"
                  class="el-upload-list__item-delete"
                >
                  <i class="el-icon-download"></i>
                </span>
                <span
                  v-if="isShow"
                  class="el-upload-list__item-delete"
                  @click="handleRemoveFile(file)"
                >
                  <i class="el-icon-delete"></i>
                </span>
              </span>
        </div>
      </el-upload>
      <el-form-item size="large">
        <el-button type="primary" @click="submitForm" :disabled="dsb" >修改</el-button>
        <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb" >修改</el-button>
      </el-form-item>
    </el-form>
@@ -228,6 +280,7 @@
    else{
      document.title = "查看收藏与荣誉详细信息";
      this.$route.meta.title = "查看收藏与荣誉详细信息";//列表的名称
      this.isShow=false
    }
    let _this = this
@@ -319,6 +372,12 @@
    handleRemove(file) {
      alert(323)
    },
    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;
      this.dialogVisible = true;