From d0460adaf25a64e37a40422e4931e3b1e5afa521 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期二, 26 九月 2023 19:14:40 +0800
Subject: [PATCH] 魅宠

---
 ruoyi-ui/src/views/healthy/healthYear.vue |  179 +++++++++++++++++++++++++++++++++--------------------------
 1 files changed, 99 insertions(+), 80 deletions(-)

diff --git a/ruoyi-ui/src/views/healthy/healthYear.vue b/ruoyi-ui/src/views/healthy/healthYear.vue
index 487f86c..6beb163 100644
--- a/ruoyi-ui/src/views/healthy/healthYear.vue
+++ b/ruoyi-ui/src/views/healthy/healthYear.vue
@@ -5,7 +5,10 @@
       <el-form-item label="浣撴鏃堕棿"  prop="checkTime">
         <el-date-picker
           v-model="dateRange"
-          style="width: 240px;"
+          style="width: 200px;
+                   height: 35px;
+                   border-radius: 16px 16px 16px 16px;
+                   opacity: 0.5;"
           value-format="yyyy-MM-dd"
           type="daterange"
           range-separator="-"
@@ -18,7 +21,10 @@
           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>
@@ -27,7 +33,10 @@
           v-model="queryParams.type"
           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>
@@ -37,7 +46,10 @@
           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>
@@ -86,7 +98,7 @@
           plain
           icon="el-icon-download"
           size="mini"
-          @click="handleExport"
+          @click="handleExportTemplate"
           v-hasPermi="['family:note:export']"
         >瀵煎叆妯℃澘涓嬭浇</el-button>
       </el-col>
@@ -162,10 +174,10 @@
             @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>
         </template>
       </el-table-column>
     </el-table>
@@ -294,7 +306,7 @@
 
 
 //鍦╯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";
 
 export default {
   name: "Role",
@@ -359,6 +371,15 @@
         checkTime:undefined,
 
       },
+      healthList:{
+        checkTime:undefined,
+        type:undefined,
+        hospital:undefined,
+        title:undefined,
+        notice:undefined,
+        remark:undefined,
+        url:undefined
+      },
       // 琛ㄥ崟鍙傛暟
       form: {},
       defaultProps: {
@@ -367,40 +388,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: '璇疯緭鍏ラ噾棰�',
-          trigger: 'blur'
-        }],
-        kind: [{
-          // required: true,
-          message: '璇疯緭鍏ユ敮浠樻柟寮�',
-          trigger: 'blur'
-        }],
-        createTime: [{
-          required: true,
-          message: '璇烽�夋嫨鏃ユ湡閫夋嫨',
+          message: '閫夋嫨浣撴鏃堕棿',
           trigger: 'change'
         }],
-        price: [{
+        notice: [{
           required: true,
-          message: '璇烽�夋嫨浜嬮」鍐呭',
+          message: '璇疯緭鍏ユ敞鎰忎簨椤�',
           trigger: 'blur'
         }],
       },
@@ -422,7 +434,7 @@
     },
 
     //闅旇鍙樿壊
-    tableRowClassName({ row, rowIndex }) {
+    tableRowClassName({row, rowIndex}) {
       if (rowIndex % 2 == 0) {
         return "statistics-warning-row1";
       } else {
@@ -452,17 +464,15 @@
       );
     },
     handleRemove(file) {
-      for(let i = 0; i < this.fileList.length; i++)
-      {
-        if(this.fileList[i].url==file.url)
-          this.$delete(this.fileList,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);
+      for (let i = 0; i < this.fileListOther.length; i++) {
+        if (this.fileListOther[i].url == file.url)
+          this.$delete(this.fileListOther, i);
       }
     },
 
@@ -514,7 +524,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
     },
 
@@ -527,7 +537,7 @@
 
 
     /** 鏌ョ湅璇︾粏淇℃伅 */
-    handleCheck(row){
+    handleCheck(row) {
       const id = row.id;
       this.$router.push("/self/healthy/healthyInfo/" + id);
     },
@@ -537,9 +547,9 @@
       let jd = true
 
       this.$router.push({
-        path:"/self/healthy/healthyInfo/" + id,
-        query:{
-          detail:jd
+        path: "/self/healthy/healthyInfo/" + id,
+        query: {
+          detail: jd
         }
       });
     },
@@ -550,15 +560,15 @@
       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) {
 
@@ -573,33 +583,28 @@
       Object.keys(this.formDat).forEach(key => {
         this.formDat[key] = '';
       });
-      for(let i = 0; i <= this.fileList.length; i++)
-      {
+      for (let i = 0; i <= this.fileList.length; i++) {
         this.handleRemove(this.fileList[0]);
       }
-      for(let i = 0; i < this.fileListOther.length; i++){
+      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})
 
         }
       })
@@ -608,36 +613,50 @@
     /** 鍒犻櫎鎸夐挳鎿嶄綔 */
     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(() => {
+      });
     },
     /** 瀵煎嚭鎸夐挳鎿嶄綔 */
     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('/family/zfEvent/export', {
+          ...this.queryParams
+        }, `zYearInfo${new Date().getTime()}.xlsx`)
+      } else {
+        this.download('/family/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
+      alert(file)
+      enload(formData).then(response => {
+        _this.getList();
+        Message({message: "瀵煎叆鎴愬姛", type: 'warning'})
+
+      }).catch(err)
+      {
+        Message({message: "瀵煎叆澶辫触", type: 'error'})
+      }
+
+    }
   }
 
 };

--
Gitblit v1.9.1