From 4efd39b4696db81789d3d92a54d197f1e85ecdf2 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期三, 17 五月 2023 17:01:43 +0800
Subject: [PATCH] 把所有模块的导入模板和导出问题都解决了

---
 ruoyi-ui/src/views/doctor/doctorInfo.vue |  105 +++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 79 insertions(+), 26 deletions(-)

diff --git a/ruoyi-ui/src/views/doctor/doctorInfo.vue b/ruoyi-ui/src/views/doctor/doctorInfo.vue
index 0ec6975..cd456ff 100644
--- a/ruoyi-ui/src/views/doctor/doctorInfo.vue
+++ b/ruoyi-ui/src/views/doctor/doctorInfo.vue
@@ -2,7 +2,7 @@
   <div class="app-container">
     <div class="form-header mt">
       <h4 class="dt h4">灏卞尰璁板綍璇︾粏淇℃伅 </h4>
-      <el-button type="primary" class="pt"  icon="el-icon-edit" @click="handleEdit()" :disabled="btn">缂栬緫</el-button>
+<!--      <el-button v-if="isShow" type="primary" class="pt"  icon="el-icon-edit" @click="handleEdit()" >缂栬緫</el-button>-->
       <!--      <br>-->
       <!--      <el-button type="primary" class="pt"   @click="handleExport"-->
       <!--                 v-hasPermi="['self:user:export']" >瀵煎嚭</el-button>-->
@@ -66,20 +66,21 @@
           >
           <span class="el-upload-list__item-actions">
         <span
+          v-if="isShow"
           class="el-upload-list__item-preview"
           @click="handlePictureCardPreview(file)"
         >
           <i class="el-icon-zoom-in"></i>
         </span>
         <span
-          v-if="!disabled"
+          v-if="isShow"
           class="el-upload-list__item-delete"
           @click="handleDownload(file.url)"
         >
           <i class="el-icon-download"></i>
         </span>
         <span
-          v-if="!disabled"
+          v-if="isShow"
           class="el-upload-list__item-delete"
           @click="handleRemove(file)"
         >
@@ -92,28 +93,60 @@
       </el-upload>
 
       <h4 class="form-header">鍏朵粬闄勪欢 </h4>
-      <el-upload
-        action=""
-        :file-list="fileListOther"
-        class="upload-demo"
-        multiple
-        :on-preview="handlePreview"
+    <el-upload
+            action=""
+            :file-list="fileListOther"
+            class="upload-demo"
+            multiple
+            list-type="picture-card"
+            :on-preview="handleFileCardPreview"
+            :on-remove="handleRemove"
+            :http-request="requestUpload"
+            :show-file-list="true"
+          >
 
-        :on-remove="handleRemove"
-        :http-request="requestUpload"
-        :show-file-list="true"
-      >
-        <el-button type="primary">鐐瑰嚮涓婁紶</el-button>
-        <template #tip>
-          <div class="el-upload__tip">
-          </div>
-        </template>
+              <i slot="default" class="el-icon-plus"></i>
+              <div slot="file" slot-scope="{file}">
+                <img
+                  class="el-upload-list__item-thumbnail"
+                  src="../../assets/401_images/401.gif"
+                  alt=""
+                  style="width: 147px; height: 147px"
+                  fit="cover"
+                >
+                <span class="el-upload-list__item-actions">
+                <span
+                  v-if="isShow"
+                  class="el-upload-list__item-preview"
+                  @click="handleFileCardPreview(file)"
+                >
+                  <i class="el-icon-zoom-in"></i>
+                </span>
+                <span
+                  v-if="isShow"
+                  @click="handleRemove(file)"
+                  class="el-upload-list__item-delete"
+
+                >
+                  <i class="el-icon-download"></i>
+                </span>
+                <span
+                  v-if="isShow"
+                  class="el-upload-list__item-delete"
+                  @click="handleRemoveFile(file)"
+                >
+                  <i class="el-icon-delete"></i>
+                </span>
+              </span>
 
 
-      </el-upload>
+              </div>
+
+
+          </el-upload>
 
       <el-form-item size="large">
-        <el-button type="primary" @click="submitForm" :disabled="dsb">淇敼</el-button>
+        <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb">淇敼</el-button>
       </el-form-item>
     </el-form>
 
@@ -137,7 +170,7 @@
     return {
       cdi:"灏卞尰璁板綍璇︾粏淇℃伅",
       udi:"灏卞尰璁板綍淇℃伅璇︽儏",
-      fot:[".jpg",".jif"],
+      fot:[".jpg",".jif","png"],
       fileList:[
       ],
       fileListOther:[
@@ -145,7 +178,7 @@
       ],
       dsb:true,
       btn:false,
-
+      isShow:true,
       // 灏卞尰璁板綍琛ㄦ牸鏁版嵁
       doctorList: [],
 
@@ -222,12 +255,14 @@
       jd =  this.$route.query.detail
       this.btn= jd
       this.dsb = !jd
+      this.isShow=true
       document.title = "淇敼灏卞尰璁板綍璇︾粏淇℃伅";
       this.$route.meta.title = "淇敼灏卞尰璁板綍璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
     }
     else{
       document.title = "鏌ョ湅灏卞尰璁板綍璇︾粏淇℃伅";
       this.$route.meta.title = "鏌ョ湅灏卞尰璁板綍璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
+      this.isShow=false
     }
 
     let _this = this
@@ -314,10 +349,24 @@
       })
     },
     handleRemoveFile(file) {
-      alert(23)
+      for(let i = 0; i < this.fileListOther.length; i++)
+      {
+        if(this.fileListOther[i].url==file.url)
+          this.$delete(this.fileListOther,i);
+      }
     },
     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);
+      }
+    },
+    handleFileCardPreview(file){
+      this.dialogFileUrl = file.url;
+      const Base64 = require('js-base64').Base64
+      this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
+      myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
     },
     handlePictureCardPreview(file) {
       this.dialogImageUrl = file.url;
@@ -331,7 +380,7 @@
       download(formData).then(async (response) => {
         const isLogin = await blobValidate(response);
         let nt = new Date().getTime()
-        let filename = 'property_'+nt+'.'+suffix
+        let filename = 'doctor_'+nt+'.'+suffix
         const blob = new Blob([response])
         saveAs(blob, filename)
       })
@@ -339,7 +388,8 @@
     handleEdit()
     {
       this.dsb = false
-      this.btn = true
+      // this.btn = true
+      this.isShow=false
     },
     requestUpload(params)
     {
@@ -378,6 +428,9 @@
 </script>
 
 <style scoped>
+.app-container{
+  background-color: #FEF7FC;
+}
 .mt
 {
   position: relative;

--
Gitblit v1.9.1