Tcsm
2023-08-18 dad56aa7392c7c914b38e4297b2e2ff4d062fab8
ruoyi-ui/src/views/secret/index.vue
@@ -100,13 +100,13 @@
      <el-table v-loading="loading" :data="secretList"  :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange" @row-click="handleCheck" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
        <el-table-column type="selection"  :reserve-selection="true" width="55"  align="center" />
        <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="120"/>
        <el-table-column label="发生时间" prop="happenTime" sortable width="100" align="center">
        <el-table-column  label="序号" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
        <el-table-column label="发生时间" prop="happenTime" sortable width="150" align="center">
          <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '————'}}</template>
        </el-table-column>
        <el-table-column label="类别" prop="type" sortable width="100" />
        <el-table-column label="账号" prop="accNo" sortable width="100" />
        <el-table-column label="有效期" prop="validityDate" sortable width="100" align="center">
        <el-table-column label="有效期" prop="validityDate" sortable width="150" align="center">
          <template slot-scope="scope">{{scope.row.validityDate? scope.row.validityDate: '————'}}</template>
        </el-table-column>
        <el-table-column label="密码" prop="password" sortable width="100" />
@@ -128,22 +128,23 @@
        <el-table-column label="电子文件" prop="url" align="center" sortable  width="110" >
          <template slot-scope="scope" >
            <div  @click="handleCheck(scope.row)">
            <img
              class="el-upload-list__item-thumbnail"
              src="../../assets/images/deviceLis.png"
              alt=""
              style="width: 35px; height: 35px;"
              fit="cover"
              v-if="scope.row.url !== ','"
            >
            <img
              class="el-upload-list__item-thumbnail"
              src="../../assets/images/deviceA.png"
              alt=""
              style="width: 35px; height: 35px;"
              fit="cover"
              v-if="scope.row.url === ','"
            ></div>
              <img
                class="el-upload-list__item-thumbnail"
                src="../../assets/images/deviceLis.png"
                alt=""
                style="width: 35px; height: 35px;"
                fit="cover"
                v-if="!(scope.row.url === '' || scope.row.url === ',' || scope.row.url === null)"
              >
              <img
                v-else
                class="el-upload-list__item-thumbnail"
                src="../../assets/images/deviceA.png"
                alt=""
                style="width: 35px; height: 35px;"
                fit="cover"
              ></div>
          </template>
        </el-table-column>
@@ -186,11 +187,11 @@
        <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
          <el-form-item label="时间" prop="happenTime">
            <el-date-picker
            <el-input
              v-model='formDat.happenTime'
              type='date'
              placeholder='选择日期'
            ></el-date-picker>
            ></el-input>
          </el-form-item>
            <el-form-item label="类别" prop="type">
            <el-input v-model="formDat.type" placeholder="请输入类别" clearable :style="{width: '100%'}" ></el-input>
@@ -200,11 +201,11 @@
          </el-form-item>
          <el-form-item label="有效期" prop="validityDate">
            <el-date-picker
            <el-input
              v-model='formDat.validityDate'
              type='date'
              placeholder='选择有效期'
            ></el-date-picker>
            ></el-input>
          </el-form-item>
          <el-form-item label="密码" prop="password">
            <el-input v-model="formDat.password" placeholder="请输入密码" clearable :style="{width: '100%'}" ></el-input>
@@ -238,7 +239,7 @@
            <el-input v-model="formDat.remark" placeholder="请输入备注" clearable :style="{width: '100%'}" ></el-input>
          </el-form-item>
          <h4 class="form-header">相关图片 </h4>
          <h4 class="form-header">相关图片</h4>
          <el-upload
            action="#"
            list-type="picture-card"
@@ -246,7 +247,8 @@
            :http-request="requestUpload"
            :file-list="fileList"
          >
            <i slot="default" class="el-icon-plus"></i>
            <div v-if="uploading" class="upload-status">正在上传...</div>
            <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
            <div slot="file" slot-scope="{file}">
              <img
                class="el-upload-list__item-thumbnail"
@@ -362,6 +364,7 @@
        ],
        dsb:true,
        btn:false,
        uploading: false,
        formDat: {
          type: undefined,
          happenTime: undefined,
@@ -650,8 +653,13 @@
        Object.keys(this.formDat).forEach(key => {
          this.formDat[key] = '';
        });
        this.handleRemove(this.fileList[0]);
        this.handleRemoveFile(this.fileListOther[0]);
        for(let i = 0; i <= this.fileList.length; i++)
        {
          this.handleRemove(this.fileList[0]);
        }
        for(let i = 0; i < this.fileListOther.length; i++){
          this.handleRemoveFile(this.fileListOther[0]);
        }
      },
      requestUpload(params)
      {
@@ -659,10 +667,11 @@
        var formData = new FormData();
        formData.append('uploadFile', file);
        let _this = this
        this.uploading = true;
        uploadPic(formData).then(response => {
          let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
          this.uploading = false;
          this.$modal.msgSuccess("上传成功");
          if(_this.fot.includes(pth) === true)
          {
            _this.fileList.push({name:response.data.fileName, "url":response.data.url})