From d428cdd48ff4c4dfdeb8c996b94ffc20803ca3a9 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期二, 26 九月 2023 20:40:35 +0800
Subject: [PATCH] 备忘本

---
 ruoyi-ui/src/views/contacts/index.vue |   88 +++++++++++++++++++++++++------------------
 1 files changed, 51 insertions(+), 37 deletions(-)

diff --git a/ruoyi-ui/src/views/contacts/index.vue b/ruoyi-ui/src/views/contacts/index.vue
index b5e101a..140a220 100644
--- a/ruoyi-ui/src/views/contacts/index.vue
+++ b/ruoyi-ui/src/views/contacts/index.vue
@@ -1,29 +1,16 @@
 <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>
-        <!--        v-model="queryParams.id"-->
-      </el-form-item>
 
-      <el-form-item label="瀹朵汉濮撳悕" prop="myName" style="padding-left:180px">
+      <el-form-item label="瀹朵汉濮撳悕" prop="myName" >
         <el-input
           v-model="queryParams.myName"
           placeholder="璇疯緭鍏ュ浜哄鍚�"
           clearable
-          style="width: 240px"
+          style="width: 200px;
+                   height: 35px;
+                   border-radius: 16px 16px 16px 16px;
+                   opacity: 0.5;"
           @keyup.enter.native="handleQuery">
           <i slot="prefix" class="el-input__icon el-icon-search"></i>
         </el-input>
@@ -35,7 +22,10 @@
           v-model="queryParams.nickName"
           placeholder="璇疯緭鍏ラ�氳褰曚腑绉板懠"
           clearable
-          style="width: 240px"
+          style="width: 200px;
+                   height: 35px;
+                   border-radius: 16px 16px 16px 16px;
+                   opacity: 0.5;"
           @keyup.enter.native="handleQuery">
           <i slot="prefix" class="el-input__icon el-icon-search"></i>
         </el-input>
@@ -46,7 +36,10 @@
             v-model="queryParams.name"
             placeholder="璇疯緭鍏ュ鍚�"
             clearable
-            style="width: 240px"
+            style="width: 200px;
+                   height: 35px;
+                   border-radius: 16px 16px 16px 16px;
+                   opacity: 0.5;"
             @keyup.enter.native="handleQuery">
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
           </el-input>
@@ -56,7 +49,10 @@
             v-model="queryParams.work"
             placeholder="璇疯緭鍏ュ伐浣滃崟浣�"
             clearable
-            style="width: 240px"
+            style="width: 200px;
+                   height: 35px;
+                   border-radius: 16px 16px 16px 16px;
+                   opacity: 0.5;"
             @keyup.enter.native="handleQuery"
           >
             <i slot="prefix" class="el-input__icon el-icon-search"></i>
@@ -140,8 +136,8 @@
     </el-row>
 
   </div>
-    <el-table v-loading="loading" :data="contactList"  :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 v-loading="loading" :data="contactList"  :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="55"  align="center" />
       <el-table-column fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80"/>
 
       <el-table-column label="瀹朵汉濮撳悕" prop="myName" sortable width="130" >
@@ -160,12 +156,10 @@
       <el-table-column label="鎵嬫満" prop="phone" sortable width="120" align="center" >
         <template slot-scope="scope">{{scope.row.phone? scope.row.phone: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
-      <el-table-column label="鍏跺畠鑱旂郴鏂瑰紡" prop="wx qq twitter" sortable width="180" align="center" >
+      <el-table-column label="鍏跺畠鑱旂郴鏂瑰紡" prop="wx qq twitter" sortable :show-overflow-tooltip="true" width="150" align="center" >
         <template slot-scope="scope">
-          <span v-if="scope.row.wx || scope.row.qq || scope.row.twitter == true">
-            {{scope.row.wx}}<br>
-            {{scope.row.qq}}<br>
-            {{scope.row.twitter}}
+          <span v-if="scope.row.wx || scope.row.qq || scope.row.twitter == true" >
+            {{scope.row.wx}}/{{scope.row.qq}}/{{scope.row.twitter}}
           </span>
           <span v-else>鈥斺�斺�斺��</span>
         </template>
@@ -177,6 +171,10 @@
           <span v-if="scope.row.isAlways== null">鈥斺��</span>
         </template>
       </el-table-column>
+      <el-table-column label="鏄惁鏄湰瀹跺涵璁板綍" prop="ownData" sortable width="150px" >
+        <template slot-scope="scope">{{scope.row.ownData === 0 ? '鍚�': '鏄�'}}</template>
+      </el-table-column>
+
 
       <el-table-column label="澶囨敞锛堟槸鍚﹀瓨鍦ㄩ噾閽卞叧绯伙級" prop="remark" sortable width="120" align="center">
         <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '鈥斺�斺�斺��'}}</template>
@@ -279,8 +277,10 @@
           </el-input>
         </el-form-item>
         <el-form-item label="鏄惁甯歌仈绯�" prop="isAlways">
-          <el-input v-model="formDat.isAlways" placeholder="鏄惁甯歌仈绯�" clearable :style="{width: '100%'}" >
-          </el-input>
+          <el-select v-model="formDat.isAlways" placeholder="璇烽�夋嫨鏄惁甯歌仈绯�" clearable :style="{width: '100%'}"  >
+            <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
+            ></el-option>
+          </el-select>
         </el-form-item>
 
         <el-form-item label="澶囨敞锛堟槸鍚﹀瓨鍦ㄩ噾閽卞叧绯伙級" prop="remark">
@@ -295,7 +295,7 @@
           :http-request="requestUpload"
           :file-list="fileList"
         >
-          <i slot="default" class="el-icon-plus"></i>
+         <i  slot="default" class="el-icon-plus"></i>
           <div slot="file" slot-scope="{file}">
             <img
               class="el-upload-list__item-thumbnail"
@@ -337,6 +337,7 @@
           :show-file-list="true"
         >
           <el-button type="primary">鐐瑰嚮涓婁紶</el-button>
+          <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div>
           <template #tip>
             <div class="el-upload__tip">
             </div>
@@ -411,7 +412,7 @@
       dsb:true,
       btn:false,
       fit:['fill'],
-
+      uploading: false,
       formDat: {
         //閫氳褰�
         id:undefined,
@@ -523,7 +524,14 @@
           trigger: 'blur'
         }],
       },
-      typeOptions: [],
+      typeOptions: [{
+        value: '1',
+        label: '鏄�',
+      },
+        {
+          value: '0',
+          label: '鍚�',
+        }],
     };
   },
   created() {
@@ -706,8 +714,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)
     {
@@ -715,10 +728,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})

--
Gitblit v1.9.1