From 2eb0cfea5b267d45163b5ba632ca6160912e9cf5 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期二, 01 八月 2023 21:21:48 +0800
Subject: [PATCH] 旅游修改

---
 ruoyi-ui/src/views/honor/honorInfo.vue |   48 ++++++++++++++++++++++++++++++++----------------
 1 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/ruoyi-ui/src/views/honor/honorInfo.vue b/ruoyi-ui/src/views/honor/honorInfo.vue
index d424aa9..20a6cf7 100644
--- a/ruoyi-ui/src/views/honor/honorInfo.vue
+++ b/ruoyi-ui/src/views/honor/honorInfo.vue
@@ -17,12 +17,12 @@
           <div>
             <el-container>
               <el-row>
-                <el-cow :span="8">
-                  <el-form-item label="鏃堕棿" prop="createTime" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
-                    <el-input v-model="formData.createTime" placeholder="璇疯緭鍏ユ椂闂�" clearable :style="{width: '100%'}" :disabled="dsb">
-                    </el-input>
-                  </el-form-item>
-                </el-cow>
+<!--                <el-cow :span="8">-->
+<!--                  <el-form-item label="鏃堕棿" prop="createTime" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">-->
+<!--                    <el-input v-model="formData.createTime" placeholder="璇疯緭鍏ユ椂闂�" clearable :style="{width: '100%'}" :disabled="dsb">-->
+<!--                    </el-input>-->
+<!--                  </el-form-item>-->
+<!--                </el-cow>-->
                 <el-cow :span="8">
                   <el-form-item label="绫诲埆" prop="type" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
                     <el-input v-model="formData.type" placeholder="璇疯緭鍏ョ被鍒�" clearable :style="{width: '100%'}" :disabled="dsb">
@@ -134,7 +134,7 @@
           multiple
           list-type="picture-card"
           :on-preview="handleFileCardPreview"
-          :on-remove="handleRemove"
+          :on-remove="handleRemoveFile"
           :http-request="requestUpload"
           :show-file-list="true"
         >
@@ -158,12 +158,11 @@
                 </span>
                 <span
                   v-if="isShow"
-                  @click="handleRemove(file)"
                   class="el-upload-list__item-delete"
-
+                  @click="handleDownload(file.url)"
                 >
-                  <i class="el-icon-download"></i>
-                </span>
+                 <i class="el-icon-download"></i>
+                 </span>
                 <span
                   v-if="isShow"
                   class="el-upload-list__item-delete"
@@ -197,6 +196,7 @@
 import {Message} from "element-ui";
 import { download,uploadPic} from "@/api/doctor/index";
 import {listHonor,updateHonor,getHonor} from "@/api/honor/index";
+import {listRoot} from "@/api/root";
 
 export default {
   components: {},
@@ -307,7 +307,7 @@
     let _this = this
     if (id) {
       this.loading = true;
-      getHonor(id).then((response) => {
+      getHonor({id}).then((response) => {
         this.formData = response.data;
         let paths = response.data.url.split(",");
         for(let i = 0; i < paths.length; i++)
@@ -319,21 +319,37 @@
             if (_this.fot.includes(pth) === true)
               _this.fileList.push({name:paths[i],url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
             else {
-              // alert(paths[i])
-              let nms = paths[i].split("\/")
-              let nm = nms[nms.length - 1]
-              _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
+            // alert(paths[i])
+            let nms = paths[i].split("\/")
+            let nm = nms[nms.length - 1]
+            _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i]})
             }
           }
         }
         this.loading = false;
       });
+
+      this.fetchData()
       this.getCateInfor()
 
     }
+
   },
   mounted() {},
   methods: {
+    // 鑾峰彇鏁版嵁鏂规硶
+    fetchData(id) {
+      const url = 'http://47.93.189.255:8080/zHonor/id=${id}'; // 鎺ュ彛 URL'/zHonor/id='+query
+      fetch(url)
+        .then(response => response.json())
+        .then(data => {
+          this.formData = data; // 閫氳繃灏嗚繑鍥炴暟鎹祴缁欑粍浠跺睘鎬ф潵鏇存柊瑙嗗浘
+        })
+        .catch(error => {
+          console.error('Error:', error); // 澶勭悊閿欒
+        });
+    },
+
     /** 鏌ヨ绫诲埆淇℃伅 */
     getCateInfor()
     {

--
Gitblit v1.9.1