Browse Source

医疗版修复

周玉佂 5 days ago
parent
commit
21dafceb39

+ 1 - 1
.env.development

@@ -3,7 +3,7 @@ VITE_NODE_ENV = 'development'
 
 
 # 应用端口
 # 应用端口
 # VITE_APP_PORT = 3000
 # VITE_APP_PORT = 3000
-VITE_APP_PORT = 5588
+VITE_APP_PORT = 3000
 
 
 # 代理前缀
 # 代理前缀
 VITE_APP_BASE_API = '/dev-api'
 VITE_APP_BASE_API = '/dev-api'

+ 6 - 0
src/api/user.ts

@@ -266,6 +266,12 @@ export interface UserQuery {
 
 
 /** 用户分页对象 */
 /** 用户分页对象 */
 export interface UserPageVO {
 export interface UserPageVO {
+  department: string
+  title: string
+  seniority: string
+  age: number
+  duration: string
+  depart: string
   /** 用户ID */
   /** 用户ID */
   id?: string
   id?: string
   /** 用户名 */
   /** 用户名 */

+ 3 - 1
src/components/Chat/ChatComponent/index.vue

@@ -13,6 +13,7 @@
         <div class="chat-list" v-for="(item, index) in messageList" :key="index">
         <div class="chat-list" v-for="(item, index) in messageList" :key="index">
           <el-divider content-position="left" border-style="dashed">
           <el-divider content-position="left" border-style="dashed">
             {{ dayjs(item.date).format('YYYY-MM-DD') }}
             {{ dayjs(item.date).format('YYYY-MM-DD') }}
+            <!--            {{ item.date }}-->
           </el-divider>
           </el-divider>
           <MessageItem v-for="(msg, msgIndex) in item.messages" :key="msgIndex" :msg="msg" />
           <MessageItem v-for="(msg, msgIndex) in item.messages" :key="msgIndex" :msg="msg" />
         </div>
         </div>
@@ -341,9 +342,10 @@ function gQuerys() {
           c = [...new Set([...userMessageLists.value, ...userMessageList.value])]
           c = [...new Set([...userMessageLists.value, ...userMessageList.value])]
           c = c.sort((a, b) => new Date(a.ctime).getTime() - new Date(b.ctime).getTime())
           c = c.sort((a, b) => new Date(a.ctime).getTime() - new Date(b.ctime).getTime())
           console.log(c, '356')
           console.log(c, '356')
+          console.log(res, 'res')
           messageList.value = [
           messageList.value = [
             {
             {
-              date: 1713426832728,
+              date: c[0].ctime,
               messages: c.map((item) => {
               messages: c.map((item) => {
                 return { id: item.sendId, name: item.sendName, time: item.sendTime, text: item.content, img: '' }
                 return { id: item.sendId, name: item.sendName, time: item.sendTime, text: item.content, img: '' }
               })
               })

+ 1 - 0
src/views/dashboard/components/IndexBarS.vue

@@ -55,6 +55,7 @@ export default {
   },
   },
   methods: {
   methods: {
     drawLinesP() {
     drawLinesP() {
+      console.log(this.yData, 'this.yData训练时长分布')
       myChart = echarts.init(document.getElementById('myCharBartId'))
       myChart = echarts.init(document.getElementById('myCharBartId'))
       myChart.setOption({
       myChart.setOption({
         xAxis: {
         xAxis: {

+ 52 - 52
src/views/dashboard/components/IndexSmoothLineS.vue

@@ -155,59 +155,59 @@ export default {
             //   focus: 'series'
             //   focus: 'series'
             // },
             // },
             data: this.yData[0]
             data: this.yData[0]
-          },
-          {
-            name: '测评次数',
-            type: 'line',
-            smooth: true,
-            symbol: 'circle', // 拐点的形状
-            symbolSize: 16, // 拐点大小
-            itemStyle: {
-              color: this.color
-            },
-            lineStyle: {
-              normal: {
-                width: 8,
-                color: this.color,
-                // 线条加阴影
-                // 设置阴影颜色
-                shadowColor: 'rgba(120, 120, 120, 0.93)',
-                // 设置阴影沿x轴偏移量为10
-                shadowOffsetX: 0,
-                // 设置阴影沿y轴偏移量为10
-                shadowOffsetY: 6,
-                // 设置阴影的模糊大小
-                shadowBlur: 8
-              }
-            },
-            // stack: 'Total',
-            phasis: {
-              //   focus: 'series'
-              // },
-            },
-            areaStyle: {
-              color: {
-                type: 'linear',
-                x: 0,
-                y: 0,
-                x2: 0,
-                y2: 1,
-                colorStops: [
-                  // 渐变颜色
-                  {
-                    offset: 0,
-                    color: this.color
-                  },
-                  {
-                    offset: 1,
-                    color: this.transparentColor
-                  }
-                ],
-                global: false
-              }
-            },
-            data: this.yData[1]
           }
           }
+          // {
+          //   name: '测评次数',
+          //   type: 'line',
+          //   smooth: true,
+          //   symbol: 'circle', // 拐点的形状
+          //   symbolSize: 16, // 拐点大小
+          //   itemStyle: {
+          //     color: this.color
+          //   },
+          //   lineStyle: {
+          //     normal: {
+          //       width: 8,
+          //       color: this.color,
+          //       // 线条加阴影
+          //       // 设置阴影颜色
+          //       shadowColor: 'rgba(120, 120, 120, 0.93)',
+          //       // 设置阴影沿x轴偏移量为10
+          //       shadowOffsetX: 0,
+          //       // 设置阴影沿y轴偏移量为10
+          //       shadowOffsetY: 6,
+          //       // 设置阴影的模糊大小
+          //       shadowBlur: 8
+          //     }
+          //   },
+          //   // stack: 'Total',
+          //   phasis: {
+          //     //   focus: 'series'
+          //     // },
+          //   },
+          //   areaStyle: {
+          //     color: {
+          //       type: 'linear',
+          //       x: 0,
+          //       y: 0,
+          //       x2: 0,
+          //       y2: 1,
+          //       colorStops: [
+          //         // 渐变颜色
+          //         {
+          //           offset: 0,
+          //           color: this.color
+          //         },
+          //         {
+          //           offset: 1,
+          //           color: this.transparentColor
+          //         }
+          //       ],
+          //       global: false
+          //     }
+          //   },
+          //   data: this.yData[1]
+          // }
         ]
         ]
       }
       }
       myChart.setOption(option)
       myChart.setOption(option)

+ 40 - 30
src/views/dashboard/index.vue

@@ -47,7 +47,7 @@
                 v-for="(item, index) in screeningProgress"
                 v-for="(item, index) in screeningProgress"
                 :key="index"
                 :key="index"
                 :text="item.name"
                 :text="item.name"
-                :percentage="item.value"
+                :percentage="Number(item.value)"
               />
               />
             </div></div
             </div></div
         ></el-row>
         ></el-row>
@@ -68,17 +68,17 @@
       <el-col :span="8" class=""
       <el-col :span="8" class=""
         ><div class="div1 w-[99%] h-[100%] rd-[20px]">
         ><div class="div1 w-[99%] h-[100%] rd-[20px]">
           <IndexSmallTitle title="训练时长分布" class="absolute top-[15px] left-[715px]" />
           <IndexSmallTitle title="训练时长分布" class="absolute top-[15px] left-[715px]" />
-          <IndexBarS class="pt-[50px]" :x-data="riskLevelDatas.xData" :y-data="riskLevelData.yData" /></div
+          <IndexBarS class="pt-[50px]" :x-data="riskLevelDatas.xData" :y-data="riskLevelDatas.yData" /></div
       ></el-col>
       ></el-col>
       <el-col :span="8" class="overflow-hidden"
       <el-col :span="8" class="overflow-hidden"
         ><div class="div1 w-[99%] h-[100%] rd-[20px] overflow-hidden">
         ><div class="div1 w-[99%] h-[100%] rd-[20px] overflow-hidden">
           <IndexSmallTitle title="训练情况概述" class="absolute top-[15px] right-[455px] z-99" />
           <IndexSmallTitle title="训练情况概述" class="absolute top-[15px] right-[455px] z-99" />
-          <div>
-            <el-table class="pt-[60px]" :data="tableData" height="80%" border>
+          <div style="padding: 10px; height: 255px; overflow: auto">
+            <el-table class="pt-[60px]" :data="tableData" height="100%" border>
               <el-table-column prop="name" fixed label="姓名" width="80" />
               <el-table-column prop="name" fixed label="姓名" width="80" />
-              <el-table-column prop="name" label="训练项目" width="120" />
-              <el-table-column prop="name" label="平均训练时长" width="120" />
-              <el-table-column prop="name" label="状态" />
+              <el-table-column prop="item" label="训练项目" width="120" />
+              <el-table-column prop="duration" label="平均训练时长" width="120" />
+              <el-table-column prop="status" label="状态" />
             </el-table>
             </el-table>
           </div></div
           </div></div
       ></el-col>
       ></el-col>
@@ -140,19 +140,19 @@
           </div>
           </div>
         </el-col>
         </el-col>
 
 
-        <el-col :span="6" :xs="24">
-          <div class="flex h-full items-center justify-around">
-            <el-statistic v-for="item in statisticData" :key="item.key" :value="item.value">
-              <template #title>
-                <div class="flex items-center">
-                  <svg-icon :icon-class="item.iconClass" size="20px" />
-                  <span class="text-[16px] ml-[4px]">{{ item.title }}</span>
-                </div>
-              </template>
-              <template v-if="item.suffix" #suffix>/100</template>
-            </el-statistic>
-          </div>
-        </el-col>
+        <!--        <el-col :span="6" :xs="24">-->
+        <!--          <div class="flex h-full items-center justify-around">-->
+        <!--            <el-statistic v-for="item in statisticData" :key="item.key" :value="item.value">-->
+        <!--              <template #title>-->
+        <!--                <div class="flex items-center">-->
+        <!--                  <svg-icon :icon-class="item.iconClass" size="20px" />-->
+        <!--                  <span class="text-[16px] ml-[4px]">{{ item.title }}</span>-->
+        <!--                </div>-->
+        <!--              </template>-->
+        <!--              <template v-if="item.suffix" #suffix>/100</template>-->
+        <!--            </el-statistic>-->
+        <!--          </div>-->
+        <!--        </el-col>-->
       </el-row>
       </el-row>
     </el-card>
     </el-card>
   </div>
   </div>
@@ -202,13 +202,7 @@ const dynamicData = ref({
 })
 })
 const groupEvaluationRatioData = ref([
 const groupEvaluationRatioData = ref([
   { name: '已完成', value: 40 },
   { name: '已完成', value: 40 },
-  { name: '2', value: 20 },
-  { name: '3', value: 20 },
-  { name: '4', value: 20 },
-  { name: '5', value: 20 },
-  { name: '6', value: 20 },
-  { name: '7', value: 20 },
-  { name: '8', value: 20 },
+  { name: '未完成', value: 20 },
   { name: '未开始', value: 40 }
   { name: '未开始', value: 40 }
 ])
 ])
 function findDoctors() {
 function findDoctors() {
@@ -234,11 +228,15 @@ function findDoctors() {
   })
   })
   HomeAPI.patPatPlanInfo({}).then((res) => {
   HomeAPI.patPatPlanInfo({}).then((res) => {
     console.log(res, 'res训练情况概览')
     console.log(res, 'res训练情况概览')
-    // tableData.value = res
+    tableData.value = res
   })
   })
   HomeAPI.patPlanInfo({}).then((res) => {
   HomeAPI.patPlanInfo({}).then((res) => {
     console.log(res, 'res训练完成度概览')
     console.log(res, 'res训练完成度概览')
-    groupEvaluationRatioData.value = res
+    groupEvaluationRatioData.value = [
+      { name: '已完成', value: res.finishCount },
+      { name: '未完成', value: res.unFinishCount },
+      { name: '未开始', value: res.unStartCount }
+    ]
   })
   })
   HomeAPI.patTrainingProgress({}).then((res) => {
   HomeAPI.patTrainingProgress({}).then((res) => {
     console.log(res, 'res实时患者训练进度')
     console.log(res, 'res实时患者训练进度')
@@ -250,7 +248,19 @@ function findDoctors() {
   })
   })
   HomeAPI.planTrendInfo({}).then((res) => {
   HomeAPI.planTrendInfo({}).then((res) => {
     console.log(res, 'res训练趋势')
     console.log(res, 'res训练趋势')
-    // dynamicData.value = res
+    let xData = []
+    let yData = []
+    Object.keys(res).forEach((key) => {
+      xData.push(key)
+      yData.push(res[key])
+    })
+    console.log(yData)
+    dynamicData.value = {
+      // 动态数据
+      xData: xData,
+      yData: [yData, yData],
+      names: yData
+    }
   })
   })
 }
 }
 async function exec() {
 async function exec() {

+ 13 - 4
src/views/information/chatList/index.vue

@@ -7,6 +7,7 @@
       >
       >
         <el-image :src="SearchUrl" fit="fill" class="w-[20px] h-[18px] ml-[8px]" />
         <el-image :src="SearchUrl" fit="fill" class="w-[20px] h-[18px] ml-[8px]" />
         <el-input v-model="searchName" placeholder="查找患者" class="search-input" />
         <el-input v-model="searchName" placeholder="查找患者" class="search-input" />
+        <el-button @click="handleQuery(searchName)">查找</el-button>
       </div>
       </div>
       <div class="user-list w-[94%] ml-[3%] mt-[18px]">
       <div class="user-list w-[94%] ml-[3%] mt-[18px]">
         <div
         <div
@@ -26,7 +27,7 @@
                 <div class="user-name text-[#414D55] font-500 text-[18px]">{{ item.name }}</div>
                 <div class="user-name text-[#414D55] font-500 text-[18px]">{{ item.name }}</div>
                 <div class="user-id text-[#90A1AC] text-[13px] mt-[8px]">
                 <div class="user-id text-[#90A1AC] text-[13px] mt-[8px]">
                   {{ item.sex }}
                   {{ item.sex }}
-                  <span class="ml-[8px]">{{ item.age }}岁</span>
+                  <span class="ml-[8px]">{{ item.age || '0' }}岁</span>
                 </div>
                 </div>
               </div>
               </div>
               <div
               <div
@@ -123,12 +124,20 @@ const showRightChat = ref(false)
 // ])
 // ])
 let testerList: any = ref([])
 let testerList: any = ref([])
 /** 查询 */
 /** 查询 */
-function handleQuery() {
+const handleQuery = (val) => {
   // loading.value = true
   // loading.value = true
-  UserAPI.findMyPat(queryParams)
+  console.log(val, 'val')
+  let params = {
+    pageNum: 1,
+    pageSize: 30,
+    username: val,
+    doctorId: userStore.user.id
+  }
+  UserAPI.findMyPat(params)
     .then((data) => {
     .then((data) => {
       console.log(data, '124')
       console.log(data, '124')
       testerList.value = data.records
       testerList.value = data.records
+      showTesters.value = data.records
       // pageData.value = data.records?.map((item) => {
       // pageData.value = data.records?.map((item) => {
       //   if (item.cardNo && item.cardNo.length > 0) {
       //   if (item.cardNo && item.cardNo.length > 0) {
       //     item.birthday = getBirthdayByIdCard(item.cardNo)
       //     item.birthday = getBirthdayByIdCard(item.cardNo)
@@ -165,7 +174,7 @@ const showTesters = ref<Array<UserType>>([])
 
 
 async function exec() {
 async function exec() {
   setTimeout(() => {
   setTimeout(() => {
-    showTesters.value = testerList.value
+    // showTesters.value = testerList.value
     // showTesters.value = testerList.value.filter((item) => {
     // showTesters.value = testerList.value.filter((item) => {
     //   return item.name.includes(searchName.value)
     //   return item.name.includes(searchName.value)
     // })
     // })

+ 4 - 2
src/views/information/manage/doc.vue

@@ -220,6 +220,8 @@ const submitForm = async (formEl: FormInstance | undefined) => {
         department: ruleForm.department,
         department: ruleForm.department,
         address: ruleForm.address,
         address: ruleForm.address,
         type: ruleForm.type,
         type: ruleForm.type,
+        duration: ruleForm.education,
+        depart: ruleForm.type,
         phone: ruleForm.phone
         phone: ruleForm.phone
       }
       }
       UserAPI.update(params).then((response) => {
       UserAPI.update(params).then((response) => {
@@ -240,8 +242,8 @@ const getUserInfo = async () => {
       // const { sex, name } = toRefs(data)
       // const { sex, name } = toRefs(data)
       ruleForm.name = data.name
       ruleForm.name = data.name
       ruleForm.sex = data.sex
       ruleForm.sex = data.sex
-      ruleForm.education = data.education || '本科'
-      ruleForm.type = data.type || '医师'
+      ruleForm.education = data.duration || '本科'
+      ruleForm.type = data.depart || '医师'
       ruleForm.age = data.age || 18
       ruleForm.age = data.age || 18
       ruleForm.phone = data.phone
       ruleForm.phone = data.phone
       ruleForm.nickName = data.note
       ruleForm.nickName = data.note

+ 1 - 1
src/views/system/user/index.vue

@@ -192,7 +192,7 @@ let formData = ref<UserPageVO>({
   avatar: '',
   avatar: '',
   sex: '',
   sex: '',
   ctime: '',
   ctime: '',
-  status: '',
+  status: '1',
   note: '',
   note: '',
   role: '',
   role: '',
   roles: []
   roles: []