From 7bbf99f0f2030d2d0672aa8d7e46ddf3cc4ab19a Mon Sep 17 00:00:00 2001
From: yz3456 <2753272399@qq.com>
Date: 星期二, 14 五月 2024 17:24:13 +0800
Subject: [PATCH] 在家大事迹中获取到了roleID

---
 ruoyi-ui/src/views/doctor/doctorInfo.vue |  124 ++++++++++++++++++++++++++++-------------
 1 files changed, 84 insertions(+), 40 deletions(-)

diff --git a/ruoyi-ui/src/views/doctor/doctorInfo.vue b/ruoyi-ui/src/views/doctor/doctorInfo.vue
index 265a676..ccbe307 100644
--- a/ruoyi-ui/src/views/doctor/doctorInfo.vue
+++ b/ruoyi-ui/src/views/doctor/doctorInfo.vue
@@ -32,13 +32,13 @@
             </el-cow>
             <el-cow :span="8">
               <el-form-item label="鐥囩姸" prop="symptom" label-width="50px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
-                <el-input v-model="formData.symptom" placeholder="璇疯緭鍏ョ棁鐘�" clearable :style="{width: '100%'}" :disabled="dsb">
-                </el-input>
+                <el-input v-if="!dsb" v-model="formData.symptom" placeholder="璇疯緭鍏ョ棁鐘�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
+                <el-input v-if="dsb" v-model="formData.symptom" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
               </el-form-item>
             </el-cow>
             <el-cow :span="8">
               <el-form-item label="鎸佺画鏃堕棿" prop="duration" label-width="68px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
-                <el-input v-model="formData.duration" placeholder="璇疯緭鍏ユ寔缁椂闂�" clearable :style="{width: '100%'}" :disabled="dsb">
+                <el-input v-model="formData.duration" placeholder="璇疯緭鍏ユ寔缁椂闂�" type="number" clearable :style="{width: '100%'}" :disabled="dsb">
                 </el-input>
               </el-form-item>
             </el-cow>
@@ -56,7 +56,8 @@
             </el-cow>
             <el-cow :span="8">
               <el-form-item label="澶囨敞" prop="remark" label-width="45px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
-          <el-input v-model="formData.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
+          <el-input v-if="!dsb" v-model="formData.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
+          <el-input v-if="dsb" v-model="formData.remark" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
         </el-form-item>
             </el-cow>
           </el-row>
@@ -73,8 +74,8 @@
             </el-cow>
             <el-cow :span="8">
               <el-form-item label="瑗垮尰澶勬柟" prop="wmedical" label-width="68px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
-            <el-input v-model="formData.wmedical" placeholder="璇疯緭鍏ヨタ鍖诲鏂�" clearable :style="{width: '100%'}" :disabled="dsb">
-            </el-input>
+              <el-input v-if="!dsb" v-model="formData.wmedical" placeholder="璇疯緭鍏ヨタ鍖诲鏂�" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
+              <el-input v-if="dsb" v-model="formData.wmedical" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb"></el-input>
           </el-form-item>
             </el-cow>
           </el-row>
@@ -94,7 +95,7 @@
         :disabled="!btn"
         :class="{ hide: !btn }"
       >
-        
+
         <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
         <div slot="file" slot-scope="{file}">
           <img
@@ -150,8 +151,8 @@
             :on-remove="handleRemoveFile"
             :http-request="requestUpload1"
             :show-file-list="true"
-			
-			
+
+
 			ref="upload1"
 			:on-change="handleChange1"
 			:auto-upload="false"
@@ -239,14 +240,15 @@
       // 鏁版嵁鑼冨洿閫夐」
       fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
         '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
-      
+
       fileList:[],
       fileList1:[],
       uploadFileList:[],
       uploadFileList1:[],
       fileListOther:[
-      
+
       ],
+      fileListOther1:[],
       dsb:true,
       btn:false,
       isShow:true,
@@ -352,7 +354,7 @@
         for(let i = 0; i < paths.length; i++)
         {
           if(paths[i]!="") {
-          
+
               let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
           //	alert(pth)
               if (_this.fot.includes(pth) === true)
@@ -371,7 +373,7 @@
                 _this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
           		else
           		_this.fileListOther.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
-          		
+
           	}
             }
         }
@@ -392,6 +394,49 @@
   },
   mounted() {},
   methods: {
+    getData(){
+      const id = this.$route.params && this.$route.params.id;
+      let _this = this
+      if (id) {
+        this.loading = true;
+        getDoctor(id).then((response) => {
+          this.formData = response.data;
+          let paths = response.data.url.split(",");
+          for(let i = 0; i < paths.length; i++)
+          {
+            if(paths[i]!="") {
+
+                let pth = paths[i].substr(paths[i].length - 4, paths[i].length)
+            //	alert(pth)
+                if (_this.fot.includes(pth) === true)
+            	{
+              console.log()
+            	  }
+                else {
+                  let nms = paths[i].split("\/")
+                  let nm = nms[nms.length - 1]
+            	  if(paths[i][0]=="/")
+                  _this.fileListOther1.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i].substr(1),res:false})
+            		else
+            		_this.fileListOther1.push({name:nm, url: process.env.VUE_APP_BASE_TRUE_API+paths[i],res:false})
+
+            	}
+              }
+          }
+          _this.fileListOther = _this.fileListOther1
+          this.loading = false;
+        });
+        listType(this.queryParams).then(response => {
+            this.typeList = response.data;
+            this.total = response.data.total;
+            // console.log( this.typeList )
+            // 鍦ㄥ洖璋冨嚱鏁颁腑璋冪敤 getTypeOptions()
+            this.getTypeOptions();
+            this.loading = false;
+          }
+        );
+      }
+    },
     //绫诲埆
     addNewOption() {
       const newOption = this.newOption.trim();
@@ -418,11 +463,8 @@
 
     },
     submitForm() {
-    
 
       this.$refs['elForm'].validate(valid => {
-
-
         if (valid) {
           if (this.formData.id != undefined) {
             updateDoctor(this.formData).then(response => {
@@ -467,10 +509,10 @@
       			this.$delete(this.uploadFileList1, Math.abs(i - this.uploadFileList1.length-1))
       		}
             this.$delete(this.fileListOther,i);
-      
+
       	}
         }
-        
+
         let ul = ""
         this.fileList.map(function (elem){
         		if(elem.res==false)
@@ -487,7 +529,7 @@
       	  updateDoctor(this.formData).then(response => {
       		this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
       		// this.open = false;
-      	  
+
       	  });
         }
     },
@@ -511,7 +553,7 @@
       		 	//	  alert(this.uploadFileList.length)
       		 }
             this.$delete(this.fileList,i);
-         
+
         }
         }
         let ul = ""
@@ -530,7 +572,7 @@
       		this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
       	  });
         }
-      
+
     },
     handleFileCardPreview(file){
       this.dialogFileUrl = file.url;
@@ -565,20 +607,20 @@
       this.btn = true
       this.isShow=false
     },
-    
+
     //鑷畾涔変笂浼犳柟娉�
         handleChange(file, fileList1) {
            //瀹氫箟涓�涓叏灞�鏁扮粍uploadFileList鏉ュ仛瀛樺偍
-    
+
          // this.uploadFileList.push(file.raw);
           console.log("=========5555=========")
     	  this.uploadFileList.push(file.raw);
     	   this.fileList.push({name:file.name,url:file.url,res:true})
         },
     	//鑷畾涔変笂浼犳柟娉�
-    	handleChange1(file, fileListOther1) {
+    	handleChange1(file, fileListOther12) {
     	       //瀹氫箟涓�涓叏灞�鏁扮粍uploadFileList鏉ュ仛瀛樺偍
-    	
+
     	     // this.uploadFileList.push(file.raw);
     		 this.uploadFileList1.push(file.raw);
     		  this.fileListOther.push({name:file.name,url:file.url,res:true})
@@ -589,7 +631,7 @@
     	},
     	fileUpload(){
     	//	var file = params.file;
-    
+
     		var formData = new FormData();
     		//this.$refs.upload1.submit();
     	//	alert(this.uploadFileList1.length)
@@ -597,14 +639,14 @@
     		if(this.uploadFileList1.length==0){
     			  this.$modal.msgSuccess("鏂囨。涓婁紶鍒楄〃涓嶈兘涓虹┖锛�");
     			  return}
-    		
+
     		this.uploadFileList1.forEach((elem)=>{
     			formData.append("files", elem)
-    			
+
     		})
     		console.log(this.uploadFileList1)
     		let _this = this
-    
+
     		this.uploading = true;
     		uploadPic(formData).then(response => {
     		_this.uploadFileList1 = []
@@ -612,27 +654,29 @@
     		    updateDoctor(_this.formData).then(response => {
     		      this.$modal.msgSuccess("鏂囨。涓婁紶鎴愬姛");
     		      // this.open = false;
+              this.getData()
+              this.fileListOther1=[]
     		    });
     		  })
-    
+
     	},
     	picUpload()
     	{
-    
+
     		var formData = new FormData();
     		//this.$refs.upload.submit();
     		//alert(this.uploadFileList.length)
     	if(this.uploadFileList.length==0){
     		  this.$modal.msgSuccess("鍥惧儚涓婁紶鍒楄〃涓嶈兘涓虹┖锛�");
     		  return}
-    
+
     		this.uploadFileList.forEach((elem)=>{
     			formData.append("files", elem)
-    			
+
     		})
     		let _this = this
-    
-    		
+
+
             uploadPic(formData).then(response => {
     			// console.log(response.originalFilenames)
     			// console.log(response.urls)
@@ -659,12 +703,12 @@
               updateDoctor(_this.formData).then(response => {
                 _this.$modal.msgSuccess("鍥剧墖涓婁紶鎴愬姛");
                 // this.open = false;
-    
+
               });
             // }
             // else{
             //   _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
-    
+
             // }
           });
     	},
@@ -672,10 +716,10 @@
         {
        //  alert(124)
     //	 this.uploadFileList.push(params.file);
-    
+
          //alert(34)
-     
-    	
+
+
         },
         requestUpload1(params)
         {

--
Gitblit v1.9.1