From bcac500a760877dc9140f1f381739793706c1af6 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期五, 10 十一月 2023 10:29:38 +0800
Subject: [PATCH] 修改图片大小

---
 ruoyi-ui/src/views/healthy/index.vue |  309 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 189 insertions(+), 120 deletions(-)

diff --git a/ruoyi-ui/src/views/healthy/index.vue b/ruoyi-ui/src/views/healthy/index.vue
index 2c375a5..42b2455 100644
--- a/ruoyi-ui/src/views/healthy/index.vue
+++ b/ruoyi-ui/src/views/healthy/index.vue
@@ -1,12 +1,16 @@
 <template>
   <div class="app-container" style="opacity: 1;">
+
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
 
-      <el-form-item label="鏃堕棿" >
+      <el-form-item label="鐪嬬梾鏃堕棿"  prop="checkTime">
         <el-date-picker
           v-model="dateRange"
-          style="width: 240px;"
-          value-format="yyyy-MM-dd HH-MM"
+          style="width: 200px;
+                   height: 35px;
+                   border-radius: 16px 16px 16px 16px;
+                   opacity: 0.5;"
+          value-format="yyyy-MM-dd"
           type="daterange"
           range-separator="-"
           start-placeholder="寮�濮嬫棩鏈�"
@@ -18,29 +22,40 @@
           v-model="queryParams.hospital"
           placeholder="璇疯緭鍏ュ氨鐥呭尰闄�"
           clearable
-          style="width: 240px"
+          style="width: 200px;
+                   height: 35px;
+                   border-radius: 16px 16px 16px 16px;
+                   opacity: 0.5;"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="绫诲埆" prop="type">
-        <el-input
-          v-model="queryParams.type"
-          placeholder="璇疯緭鍏ョ被鍒�"
-          clearable
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
+
 
       <el-form-item label="棰樺悕" prop="title">
         <el-input
           v-model="queryParams.title"
           placeholder="璇疯緭鍏ラ鍚�"
           clearable
-          style="width: 240px"
+          style="width: 200px;
+                   height: 35px;
+                   border-radius: 16px 16px 16px 16px;
+                   opacity: 0.5;"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+
+        <el-button size="mini" type="text" @click="toYearhealthy" v-hasPermi="['person:healthy:healthYear']">
+          <div class="form1" ><el-icon  style="padding-right:100px;"></el-icon>
+            <span class="text" style="width: 69px;height: 26px;font-size: 16px;
+            font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">鍋ュ悍鎯呭喌</span></div>
+        </el-button>
+
+      <el-button size="mini" type="text" @click="toExamination" v-hasPermi="['person:healthy:healthYear']">
+        <div class="form2" ><el-icon  style="padding-right:50px;"></el-icon>
+          <span class="text" style="width: 69px;height: 26px;font-size: 16px;
+            font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">鍘嗗勾浣撴鎯呭喌</span></div>
+      </el-button>
+
       <el-form-item>
         <el-button  size="mini" @click="handleQuery" style=" width: 65px; height: 32px;background: #FFDDE3;border-radius:6px 6px 6px 6px;opacity:1;">鎼滅储</el-button>
         <el-button  size="mini" @click="resetQuery" style=" width: 65px;height: 32px; background: #FFDDE3; border-radius:6px 6px 6px 6px;opacity: 1;">閲嶇疆</el-button>
@@ -86,7 +101,7 @@
           plain
           icon="el-icon-download"
           size="mini"
-          @click="handleExport"
+          @click="handleExportTemplate"
           v-hasPermi="['family:note:export']"
         >瀵煎叆妯℃澘涓嬭浇</el-button>
       </el-col>
@@ -99,7 +114,7 @@
         >
           <el-button size="mini"   type="primary"
                      plain
-                     icon="el-icon-plus" >瀵煎叆</el-button>
+                 icon="el-icon-top">瀵煎叆</el-button>
 
         </el-upload>
       </el-col>
@@ -110,33 +125,35 @@
       <el-table-column type="selection" 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="checkTime" sortable width="150" align="center">
+      <el-table-column label="鐪嬬梾鏃堕棿" prop="checkTime" sortable width="200" align="center">
         <template slot-scope="scope">{{scope.row.checkTime? scope.row.checkTime: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
-      <el-table-column label="绫诲埆" prop="type" sortable width="120" />
+
       <el-table-column label="灏辩梾鍖婚櫌" prop="hospital" sortable width="120" >
 
       </el-table-column>
       <el-table-column label="棰樺悕" prop="title" sortable width="150" />
       <el-table-column label="娉ㄦ剰浜嬮」" prop="notice" sortable width="150" />
-      <el-table-column label="浣撴鎶ュ憡(鐢靛瓙鏂囦欢)" prop="url" align="center" sortable  width="200" >
+      <el-table-column label="鐢靛瓙鏂囦欢" prop="url" align="center" sortable  width="150" >
         <template slot-scope="scope" >
-          <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  @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 === '' || 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>
 
@@ -144,8 +161,9 @@
       <el-table-column label="澶囨敞" prop="remark" sortable width="120" >
         <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
-      <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="鎿嶄綔" align="center" width="250" class-name="small-padding fixed-width">
         <template slot-scope="scope" v-if="scope.row.roleId !== 1">
+          <div class="button-container">
           <el-button
             size="mini"
             type="text"
@@ -160,10 +178,11 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['system:role:remove']"
           >鍒犻櫎</el-button>
-          <!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:economy:info']">
+          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['familymodel:bignote:list']">
             <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">鏌ョ湅璇︽儏</el-button>
 
-          </el-dropdown> -->
+          </el-dropdown>
+          </div>
         </template>
       </el-table-column>
     </el-table>
@@ -181,18 +200,13 @@
       <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
 
 
-        <el-form-item label="浣撴鏃堕棿" prop="checkTime">
-          <el-date-picker
-            v-model='formDat.checkTime'
-            type='date'
-            placeholder='閫夋嫨鏃ユ湡'
+        <el-form-item label="鍙戠敓鏃堕棿" prop="checkTime">
+          <el-date-picker v-model="formDat.checkTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                          :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
           ></el-date-picker>
         </el-form-item>
 
-        <el-form-item label="绫诲埆" prop="type">
-          <el-input v-model="formDat.type" placeholder="璇疯緭鍏ョ被鍒�" clearable :style="{width: '100%'}" >
-          </el-input>
-        </el-form-item>
+
         <el-form-item label="灏辩梾鍖婚櫌" prop="hospital">
           <el-input v-model="formDat.hospital" placeholder="璇疯緭鍏ュ氨鐥呭尰闄�" clearable :style="{width: '100%'}" >
           </el-input>
@@ -224,6 +238,7 @@
             <img
               class="el-upload-list__item-thumbnail"
               :src="file.url"
+
               alt=""
               style="width: 126px; height: 126px"
               fit="cover"
@@ -256,11 +271,11 @@
           class="upload-demo"
           multiple
 
-          :on-remove="handleRemove"
+          :on-remove="handleRemoveFile"
           :http-request="requestUpload"
           :show-file-list="true"
         >
-          <el-button type="primary">涓婁紶</el-button>
+          <el-button type="primary">鐐瑰嚮涓婁紶</el-button>
           <template #tip>
             <div class="el-upload__tip">
             </div>
@@ -291,7 +306,8 @@
 
 
 //鍦╯ystem/note/index.js涓鍏ユ帴鍙e嚱鏁�  --鎺ュソ浜�
-import {listHealth,enload,delHealth,getHealthInfo, addHealth, uploadPic} from "@/api/healthy/index";
+import {listHealth,enload,delHealth,uploadPic, addHealth} from "@/api/healthy/index";
+import {Message} from "element-ui";
 
 export default {
   name: "Role",
@@ -330,9 +346,7 @@
       fot:[".jpg",".jif"],
       fileList:[
       ],
-      fileListOther:[
-
-      ],
+      fileListOther:[ ],
       dsb:true,
       btn:false,
       formDat: {
@@ -355,8 +369,17 @@
         type:undefined,
         useFor:undefined,
         usePeople:undefined,
-        createTime:undefined,
+        checkTime:undefined,
 
+      },
+      healthList:{
+        checkTime:undefined,
+        type:undefined,
+        hospital:undefined,
+        title:undefined,
+        notice:undefined,
+        remark:undefined,
+        url:undefined
       },
       // 琛ㄥ崟鍙傛暟
       form: {},
@@ -366,40 +389,31 @@
       },
       // 琛ㄥ崟鏍¢獙
       rules: {
-        usePeople: [{
+        title: [{
           required: true,
-          message: '璇疯緭鍏ヤ娇鐢ㄤ汉',
+          message: '璇疯緭鍏ユ爣棰�',
           trigger: 'blur'
         }],
 
-        useFor: [{
+        hospital: [{
           required: true,
-          message: '璇疯緭鍏ョ敤閫�',
+          message: '璇疯緭鍏ュ氨鐥呭尰闄�',
           trigger: 'blur'
         }],
         type: [{
           required: true,
-          message: '璇疯緭鍏ュ彴璐﹀唴瀹�',
+          message: '璇疯緭鍏ョ被鍒�',
           trigger: 'blur'
         }],
-        balance: [{
+
+        checkTime: [{
           required: true,
-          message: '璇疯緭鍏ラ噾棰�',
+          message: '閫夋嫨浣撴鏃堕棿',
           trigger: 'blur'
         }],
-        kind: [{
-          // required: true,
-          message: '璇疯緭鍏ユ敮浠樻柟寮�',
-          trigger: 'blur'
-        }],
-        createTime: [{
+        notice: [{
           required: true,
-          message: '璇烽�夋嫨鏃ユ湡閫夋嫨',
-          trigger: 'change'
-        }],
-        price: [{
-          required: true,
-          message: '璇烽�夋嫨浜嬮」鍐呭',
+          message: '璇疯緭鍏ユ敞鎰忎簨椤�',
           trigger: 'blur'
         }],
       },
@@ -421,7 +435,7 @@
     },
 
     //闅旇鍙樿壊
-    tableRowClassName({ row, rowIndex }) {
+    tableRowClassName({row, rowIndex}) {
       if (rowIndex % 2 == 0) {
         return "statistics-warning-row1";
       } else {
@@ -451,10 +465,15 @@
       );
     },
     handleRemove(file) {
-      for(let i = 0; i < this.fileListOther.length; i++)
-      {
-        if(this.fileListOther[i].url==file.url)
-          this.$delete(this.fileListOther,i);
+      for (let i = 0; i < this.fileList.length; i++) {
+        if (this.fileList[i].url == file.url)
+          this.$delete(this.fileList, i);
+      }
+    },
+    handleRemoveFile(file) {
+      for (let i = 0; i < this.fileListOther.length; i++) {
+        if (this.fileListOther[i].url == file.url)
+          this.$delete(this.fileListOther, i);
       }
     },
 
@@ -506,7 +525,7 @@
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
       console.log(this.ids)
-      this.single = selection.length!=1
+      this.single = selection.length != 1
       this.multiple = !selection.length
     },
 
@@ -519,7 +538,7 @@
 
 
     /** 鏌ョ湅璇︾粏淇℃伅 */
-    handleCheck(row){
+    handleCheck(row) {
       const id = row.id;
       this.$router.push("/self/healthy/healthyInfo/" + id);
     },
@@ -529,9 +548,9 @@
       let jd = true
 
       this.$router.push({
-        path:"/self/healthy/healthyInfo/" + id,
-        query:{
-          detail:jd
+        path: "/self/healthy/healthyInfo/" + id,
+        query: {
+          detail: jd
         }
       });
     },
@@ -542,44 +561,52 @@
       this.dialogVisible = true;
     },
     /** 鎻愪氦鎸夐挳锛堟暟鎹潈闄愶級 */
-    submitDataScope: function() {
+    submitDataScope: function () {
 
-      let ul = this.fileList.map(function (elem){
-        return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API,"")
+      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,"")
+      let uls = this.fileListOther.map(function (elem) {
+        return elem.url.replace(process.env.VUE_APP_BASE_TRUE_API, "")
       }).join(",")
-      this.formDat.url = ul+","+uls
+      this.formDat.url = ul + "," + uls
       this.$refs["elForm"].validate(valid => {
         if (valid) {
-
           addHealth(this.formDat).then(response => {
             this.$modal.msgSuccess("鏂板鎴愬姛");
             this.open = false;
+
             this.getList();
+            // 娓呯┖formDat瀵硅薄鐨勬暟鎹�
+            Object.keys(this.formDat).forEach(key => {
+              this.formDat[key] = '';
+            });
+            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)
-    {
+    requestUpload(params) {
       var file = params.file;
       var formData = new FormData();
       formData.append('uploadFile', file);
       let _this = this
 
       uploadPic(formData).then(response => {
-        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
+        let pth = response.data.originalFilename.substr(response.data.originalFilename.length - 4, response.data.originalFilename.length)
 
-        if(_this.fot.includes(pth) === true)
-        {
-          _this.fileList.push({name:response.data.fileName, "url":response.data.url})
+        if (_this.fot.includes(pth) === true) {
+          _this.fileList.push({name: response.data.fileName, "url": response.data.url})
 
-        }
-
-        else{
-          _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
+        } else {
+          _this.fileListOther.push({name: response.data.fileName, url: response.data.url})
 
         }
       })
@@ -588,36 +615,60 @@
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     handleDelete(row) {
       const Ids = row.id || this.ids;
-      this.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫夋暟鎹」锛�').then(function() {
+      this.$modal.confirm('鏄惁纭鍒犻櫎鎵�閫夋暟鎹」锛�').then(function () {
         return delHealth(Ids);
       }).then(() => {
         this.getList();
         this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
-      }).catch(() => {});
+      }).catch(() => {
+      });
+    },
+    //骞村害鍋ュ悍鎶ュ憡
+    toYearhealthy(){
+      this.$router.push("/self/healthy/healthYear" );
+    },
+    //浣撴琛�
+    toExamination(){
+      this.$router.push("/self/healthy/Examination" );
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+
     handleExport() {
-      this.download('/zfEconomy/export', {
-        ...this.queryParams
-      }, `zfEconomy_${new Date().getTime()}.xlsx`)
-    }
-  },
-  /** 瀵煎叆鎿嶄綔*/
-  handleEnport(params){
-    var file = params.file;
-    var formData = new FormData();
-    formData.append('excelImport', file);
-    let _this = this
-    alert(file)
-    enload(formData).then(response => {
-      _this.getList();
-      Message({ message: "瀵煎叆鎴愬姛", type: 'warning' })
+      const Ids = this.ids;
 
-    }).catch(err)
+      if (Ids.length == 0) {
+        this.download('/zYearInfo/export', {
+          ...this.queryParams
+        }, `zYearInfo${new Date().getTime()}.xlsx`)
+      } else {
+        this.download('/zYearInfo/export1/' + Ids, {}, `zYearInfo${new Date().getTime()}.xlsx`)
+      }
+    },
+    /** 瀵煎叆妯℃澘涓嬭浇鎿嶄綔*/
+    handleExportTemplate()
     {
-      Message({ message: "瀵煎叆澶辫触", type: 'error' })
-    }
+      this.download('/zYearInfo/model', {
 
+      }, `zYearInfo${new Date().getTime()}.xlsx`)
+    },
+    /** 瀵煎叆鎿嶄綔*/
+    handleEnport(params){
+      var file = params.file;
+      var formData = new FormData();
+      formData.append('excelImport', file);
+      let _this = this
+      enload(formData).then(response => {
+        _this.getList();
+        Message({ message: "瀵煎叆鎴愬姛", type: 'warning' })
+
+      }).catch(err)
+      {
+        Message({ message: "瀵煎叆澶辫触", type: 'error' })
+      }
+
+
+
+    }
   }
 
 };
@@ -632,4 +683,22 @@
   background: #FFEFF2;
 
 }
+.form1 {
+  position: absolute;
+  right: 60px;
+  top:20px;
+  background:center/11% no-repeat url('../../assets/icons/form.png') ;
+}
+.form2 {
+  position: absolute;
+  right: 200px;
+  top:20px;
+
+}
+.el-table__cell {
+  font-size: 14px; /* 璁剧疆瀛椾綋澶у皬 */
+}
+.button-container {
+  display: inline-flex; /* 璁剧疆鎸夐挳瀹瑰櫒涓鸿鍐呭厓绱� */
+}
 </style>

--
Gitblit v1.9.1