feige
2023-09-10 8319f67b9bec1d19c06eaa4216f0f34c67e3afb1
ruoyi-ui/src/views/self/memo.vue
@@ -1,23 +1,24 @@
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
      <el-form-item label="" prop="phone wx qq twitter isAlways remark" >
        <el-input
          v-model:phone="queryParams.phone"
          v-model:wx="queryParams.wx"
          v-model:qq="queryParams.qq"
          v-model:twitter="queryParams.twitter"
          v-model:isAlways="queryParams.isAlways"
          v-model:remark="queryParams.remark"
          placeholder="在“个人记事本”中搜索"
          clearable
          style="width: 240px"
          @keyup.enter.native="handleQuery">
          <i slot="prefix" class="el-input__icon el-icon-search"></i>
        </el-input>
<!--      -->
<!--        <el-input-->
<!--          v-model:phone="queryParams.phone"-->
<!--          placeholder=""-->
<!--          clearable-->
<!--          style="width: 240px"-->
<!--          @keyup.enter.native="handleQuery">-->
<!--          <i slot="prefix" class="el-input__icon el-icon-search"></i>-->
<!--        </el-input>-->
<!--      -->
      <el-form-item label="" prop="address title remark people happenTime" >
        <el-input v-model="keyword" placeholder="在“个人记事本”中搜索" clearable
                  style="width: 240px"
                  @keyup.enter.native="handleQuery">
        <i slot="prefix" class="el-input__icon el-icon-search"></i></el-input>
      </el-form-item>
      <el-form-item label="时间">
      <el-form-item label="时间" prop="happenTime">
        <el-date-picker
          v-model="dateRange"
          style="width:  197px;
@@ -138,7 +139,7 @@
    </div>
    <el-table v-loading="loading" :data="noteList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
      <el-table-column type="selection" :reserve-selection="true" width="25"  align="center" />
      <el-table-column type="selection" :reserve-selection="true" width="55"  align="center" />
      <el-table-column fixed label="序号" sortable type="index" align="center" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60"/>
      <el-table-column label="时间" prop="happenTime" sortable :show-overflow-tooltip="true" width="150" align="center" >
@@ -165,15 +166,16 @@
              alt=""
              style="width: 35px; height: 35px;"
              fit="cover"
              v-if="scope.row.url !== ','"
              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"
              v-if="scope.row.url ===',' "
            ></div>
        </template>
      </el-table-column>
@@ -220,8 +222,9 @@
      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
        <el-form-item label="时间" prop="happenTime">
          <el-input v-model="formDat.happenTime" type='date' placeholder='选择日期' clearable :style="{width: '100%'}" ></el-input>
        </el-form-item>
          <el-date-picker v-model="formDat.happenTime" type="date" placeholder="请选择日期"
                          :editable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
          ></el-date-picker></el-form-item>
        <el-form-item label="人物" prop="people">
          <el-input v-model="formDat.people" placeholder="请输入人物" clearable :style="{width: '100%'}" >
          </el-input>
@@ -239,7 +242,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"
@@ -289,6 +292,7 @@
          :show-file-list="true"
        >
          <el-button type="primary">点击上传</el-button>
          <div v-if="uploading" class="upload-status">正在上传...</div>
          <template #tip>
            <div class="el-upload__tip">
            </div>
@@ -363,8 +367,9 @@
      ],
      dsb:true,
      btn:false,
      uploading: false,
      fit:['fill'],
      keyword:'',
      formDat: {
        //个人记事本详情
        id:undefined,
@@ -387,7 +392,7 @@
        people:undefined,
        address:undefined,
        title:undefined,
        remark:undefined
      },
      // searchVal:"",
@@ -436,6 +441,7 @@
    //   this.formDat[i] = this.contactList[i];
    // }
  },
  methods: {
    // 取消按钮
    cancelData() {
@@ -454,6 +460,8 @@
    /** 查询记录列表 */
    getList() {
      this.loading = true;
      this.queryParams.happenStartTime = this.dateRange.length > 0 && this.dateRange[0]
      this.queryParams.happenEndTime = this.dateRange.length > 0 && this.dateRange[1]
      // console.log(this.queryParams)
      //  listProperty(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
      listNote(this.queryParams).then(response => {
@@ -478,7 +486,11 @@
      })
    },
    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);
      }
    },
    // 取消按钮
    cancel() {
@@ -597,6 +609,7 @@
      Object.keys(this.formDat).forEach(key => {
        this.formDat[key] = '';
      });
      this.handleRemove(this.fileList[0]);
    },
    requestUpload(params)
    {
@@ -604,10 +617,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})