From 1737343f1ac89c5980a268775a201304c47151ca Mon Sep 17 00:00:00 2001
From: Tcsm <1377977403@qq.com>
Date: 星期二, 08 八月 2023 19:38:58 +0800
Subject: [PATCH] 个人模块的查看详情电子文件三键

---
 ruoyi-ui/src/views/doctor/index.vue |   81 +++++++++++++++++++++-------------------
 1 files changed, 42 insertions(+), 39 deletions(-)

diff --git a/ruoyi-ui/src/views/doctor/index.vue b/ruoyi-ui/src/views/doctor/index.vue
index f413210..7efd297 100644
--- a/ruoyi-ui/src/views/doctor/index.vue
+++ b/ruoyi-ui/src/views/doctor/index.vue
@@ -52,27 +52,10 @@
       </el-form-item>
 
       <el-form-item label="绫诲埆" prop="type">
-<!--        <el-input-->
-<!--          v-model="queryParams.type"-->
-<!--          placeholder="璇疯緭鍏ョ棁鐘�"-->
-<!--          clearable-->
-<!--          style="width: 240px"-->
-<!--          @keyup.enter.native="handleQuery">-->
-<!--          <i slot="prefix" class="el-input__icon el-icon-search"></i>-->
-<!--        </el-input>-->
-        <el-select
-          v-model="queryParams.type"
-          placeholder="鎵�鏈夌被鍒�"
-          clearable
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        >
-          <el-option
-            v-for="item in typeOptions"
-            :key="item.value"
-            :label="item.label"
-            :value="item.value"
-          />
+        <el-select v-model="queryParams.type" placeholder="鎵�鏈夌被鍒�" clearable
+          style="width: 240px" @keyup.enter.native="handleQuery">
+          <el-option v-for="item in typeOptions"
+            :key="item.value" :label="item.label" :value="item.value"/>
         </el-select>
       </el-form-item>
 
@@ -202,11 +185,11 @@
     <el-table v-loading="loading" :data="doctorList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
       <el-table-column type="selection" :reserve-selection="true" width="25"  align="center" />
       <el-table-column fixed label="搴忓彿" sortable type="index" align="center" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="60"/>
-      <el-table-column label="绫诲瀷" prop="type" sortable width="80" align="center">
+      <el-table-column label="绫诲埆" prop="type" sortable width="80" align="center">
 <!--        <template slot-scope="scope">{{ getSrc(scope.row.type) }}</template>-->
         <template slot-scope="scope">{{scope.row.type? scope.row.type: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
-      <el-table-column label="鐥囩姸" prop="symptom" sortable :show-overflow-tooltip="true" width="120" align="center" >
+      <el-table-column  label="鐥囩姸" prop="symptom" sortable :show-overflow-tooltip="true" width="120" align="center" >
         <template slot-scope="scope">{{scope.row.symptom? scope.row.symptom: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
       <el-table-column label="鎸佺画鏃堕棿" prop="duration" sortable :show-overflow-tooltip="true" width="160" align="center" >
@@ -293,7 +276,7 @@
     <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
       <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="100px">
 
-        <el-form-item label="绫诲瀷" prop="type">
+        <el-form-item label="绫诲埆" prop="type">
           <el-select v-model="formDat.type" placeholder="璇烽�夋嫨绫诲埆" clearable :style="{width: '100%'}"  >
             <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
             ></el-option>
@@ -409,7 +392,7 @@
 
 
 //瀵煎叆鎺ュ彛鍑芥暟
-import {listDoctor,enload,getDoctor, addDoctor,updateDoctor, delDoctor,uploadPic} from "@/api/doctor/index";
+import {listDoctor,enload,getDoctor, addDoctor,updateDoctor, delDoctor,uploadPic,listType} from "@/api/doctor/index";
 
 import { Notification, MessageBox, Message, Loading } from 'element-ui'
 export default {
@@ -434,6 +417,7 @@
       total: 0,
       // 灏忓尰鐢熻〃鏍兼暟鎹�
       doctorList: [],
+      typeList:[],
       // 寮瑰嚭灞傛爣棰�
       title: "",
       // 鏄惁鏄剧ず寮瑰嚭灞�
@@ -447,7 +431,8 @@
       // 鏃ユ湡鑼冨洿
       dateRange: [],
       // 鏁版嵁鑼冨洿閫夐」
-      fot:[".jpg",".jif"],
+      fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
+        '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
       fileList:[],
       fileListOther:[],
       dsb:true,
@@ -496,7 +481,7 @@
 
         type: [{
           // required: true,
-          message: '璇疯緭鍏ョ被鍨�',
+          message: '璇疯緭鍏ョ被鍒�',
           trigger: 'blur'
         }],
         symptom: [{
@@ -536,23 +521,15 @@
           trigger: 'blur'
         }],
       },
-      typeOptions: [{
-        value:'绁炵粡绉�',
-        label:'绁炵粡绉�'
-      },{
-        value:'鐗欑',
-        label:'鐗欑'
-      },{
-        value:'鍐呯',
-        label:'鍐呯'
-      }],
+      typeOptions: [],
       newOption: undefined,
       showInput: true
     };
   },
   created() {
     this.getList();
-    this.getCateInfor()
+    // this.getCateInfor();
+    this.getTypeOptions();
     // for (let i = 0; i < this.contactList.length; i++) {
     //   this.formDat[i] = this.contactList[i];
     // }
@@ -580,6 +557,7 @@
         this.$set(this.formDat, 'type', newOption); // 鏇存柊formDat.type鐨勫�间负鏂扮殑閫夐」
       }
     },
+
     /** 鏌ヨ璁板綍鍒楄〃 */
     getList() {
       this.loading = true;
@@ -589,12 +567,37 @@
           //  alert(123)
           //   console.log(response.data)
           this.doctorList = response.data.data;
-
           this.total = response.data.total;
           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;
+        }
+      );
     },
+    getTypeOptions() {
+      const filteredOptions = this.typeList.filter(item => typeof item === 'string' && item !== '');
+      // 鍒涘缓涓�涓┖瀵硅薄鐢ㄤ簬瀛樺偍鍞竴鐨勫瓧绗︿覆閫夐」
+      const uniqueOptions = {};
+      // 鏋勫缓涓嬫媺閫夐」鍒楄〃
+      this.typeOptions = filteredOptions.reduce((options, option) => {
+        if (!uniqueOptions[option]) {
+          uniqueOptions[option] = true;
+          options.push({
+            label: option,
+            value: option
+          });
+        }
+        return options;
+      }, []);
+
+      },
     /** 鏌ヨ绫诲埆淇℃伅 */
     // getCateInfor()
     // {

--
Gitblit v1.9.1