feige
2024-01-23 d0136913a2c74a44f5bb30327ebbb3fd85e24fce
ruoyi-ui/src/views/secret/secretInfo.vue
@@ -38,15 +38,27 @@
          </el-input>
        </el-form-item>
        <el-form-item label="是否开启指纹" prop="isFinger">
          <el-input v-model="formData.isFinger" placeholder="请输入持有人" clearable :style="{width: '100%'}" :disabled="dsb">
    <el-select v-model="formData.isFinger" placeholder="请选择是/否" clearable :style="{width: '100%'}" :disabled="dsb" >
              <el-option v-for="(item, index) in typeOptions2" :key="index" :label="item.label" :value="item.value"
              ></el-option>
            </el-select>
          <!-- <el-input v-model="formData.isFinger" :active-value="是" :inactive-value="否" placeholder="请输入持有人" clearable :style="{width: '100%'}" :disabled="dsb"> -->
          </el-input>
        </el-form-item>
        <el-form-item label="是否开启人脸" prop="isFace">
          <el-input v-model="formData.isFace" placeholder="请选择现金/自动划扣" clearable :style="{width: '100%'}" :disabled="dsb">
            </el-input>
            <el-select v-model="formData.isFace" placeholder="请选择是/否" clearable :style="{width: '100%'}" :disabled="dsb" >
                      <el-option v-for="(item, index) in typeOptions2" :key="index" :label="item.label" :value="item.value"
                      ></el-option>
                    </el-select>
        </el-form-item>
        <el-form-item label="私有/公有" prop="isPrivate">
          <el-input v-model="formData.isPrivate" placeholder="请输入余额" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
          <el-select v-model="formData.isPrivate" placeholder="请选择是/否" clearable :style="{width: '100%'}" :disabled="dsb" >
                    <el-option v-for="(item, index) in typeOptions3" :key="index" :label="item.label" :value="item.value"
                    ></el-option>
                  </el-select>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="formData.remark" placeholder="请输入备注" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
@@ -131,7 +143,7 @@
               class="el-upload-list__item-thumbnail"
               src="../../assets/401_images/401.gif"
               alt=""
               style="width: 100%; height: 100%"
               style="width: 147px; height: 147px"
               fit="cover">
          <span class="el-upload-list__item-actions">
@@ -170,7 +182,7 @@
      <el-dialog  :visible.sync="dialogVisible">
        <img w-full :src="dialogImageUrl" alt="Preview Image" />
        <img w-full :src="dialogImageUrl" style="width: 100%; height: 100%" alt="Preview Image" />
      </el-dialog>
    </div>
  </template>
@@ -188,7 +200,10 @@
      return {
        cdi:"隐私详细信息",
        udi:"隐私信息修改",
        fot:[".jpg",".jif"],
       // 数据范围选项
       fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
         '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
        fileList:[
        ],
        fileListOther:[
@@ -257,6 +272,26 @@
          }],
        },
        typeOptions2: [
          {
            value: '否',
            label: '否',
          },
          {
            value: '是',
            label: '是',
          }
        ],
        typeOptions3: [
          {
            value: '私有',
            label: '私有',
          },
          {
            value: '公有',
            label: '公有',
          }
        ],
        typeOptions: [{
    value: '0',
    label: '基金',
@@ -278,11 +313,11 @@
        this.btn= jd
        this.dsb = !jd
        this.isShow=true
        document.title = "修改隐私详细信息";
    //    document.title = "修改隐私详细信息";
        this.$route.meta.title = "修改隐私详细信息";//列表的名称
      }
      else{
        document.title = "查看隐私详细信息";
     //   document.title = "查看隐私详细信息";
        this.$route.meta.title = "查看隐私详细信息";//列表的名称
        this.isShow=false
        this.btn = false;
@@ -293,6 +328,18 @@
        this.loading = true;
        getSecretInfo({id}).then((response) => {
          this.formData = response.data;
          if(this.formData.isFinger==1)
            this.formData.isFinger = '是'
          else
          this.formData.isFinger = '否'
     if(this.formData.isFace==1)
            this.formData.isFace = '是'
          else
          this.formData.isFace = '否'
          if(this.formData.isPrivate==1)
                 this.formData.isPrivate = '公有'
               else
               this.formData.isPrivate = '私有'
          let paths = response.data.url.split(",");
          for(let i = 0; i < paths.length; i++)
          {
@@ -343,7 +390,18 @@
          return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
         }).join(",")
          this.formData.url = ul+","+uls
if(this.formData.isFinger=='是')
            this.formData.isFinger = 1
          else
          this.formData.isFinger = 0
     if(this.formData.isFace=='是')
            this.formData.isFace = 1
          else
          this.formData.isFace = 0
          if(this.formData.isPrivate== '公有')
                 this.formData.isPrivate =1
               else
               this.formData.isPrivate = 0
        this.$refs['elForm'].validate(valid => {
@@ -351,10 +409,34 @@
            if (this.formData.id != undefined) {
              updateSecret(this.formData).then(response => {
                this.$modal.msgSuccess("修改成功");
                if(this.formData.isFinger==1)
                       this.formData.isFinger = '是'
                     else
                     this.formData.isFinger = '否'
                if(this.formData.isFace==1)
                       this.formData.isFace = '是'
                     else
                     this.formData.isFace = '否'
                     if(this.formData.isPrivate==1)
                            this.formData.isPrivate = '公有'
                          else
                          this.formData.isPrivate = '私有'
                // this.open = false;
                this.btn=false
              });
            } else {
              if(this.formData.isFinger==1)
                     this.formData.isFinger = '是'
                   else
                   this.formData.isFinger = '否'
              if(this.formData.isFace==1)
                     this.formData.isFace = '是'
                   else
                   this.formData.isFace = '否'
                   if(this.formData.isPrivate==1)
                          this.formData.isPrivate = '公有'
                        else
                        this.formData.isPrivate = '私有'
              this.$modal.msgSuccess("修改失败");
            }
@@ -448,6 +530,20 @@
            _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
          }
        let ul = _this.fileList.map(function (elem){
            return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
          }).join(",")
          let uls = _this.fileListOther.map(function (elem){
            return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
          }).join(",")
          _this.formData.url = ul+","+uls
          console.log(_this.formData.url)
        //  alert(87)
          updateSecret(_this.formData).then(response => {
            this.$modal.msgSuccess("图片上传成功");
            // this.open = false;
          });
        })
      },
@@ -470,7 +566,7 @@
  }
  </script>
  <style scoped lang="scss">
  <style scoped>
  .mt
  {
    position: relative;
@@ -485,7 +581,7 @@
    display: block;
    position: absolute;
  }
  .hide .el-upload--picture-card {
  .hide /deep/ .el-upload--picture-card {
    display: none;
  }
  .form{