Browse Source

医疗版修复

周玉佂 1 day ago
parent
commit
ca06c76589

+ 1 - 1
.env.development

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

+ 3 - 0
src/api/user.ts

@@ -266,6 +266,9 @@ export interface UserQuery {
 
 
 /** 用户分页对象 */
 /** 用户分页对象 */
 export interface UserPageVO {
 export interface UserPageVO {
+  address: string
+  handedness: string
+  type: string
   department: string
   department: string
   title: string
   title: string
   seniority: string
   seniority: string

+ 5 - 2
src/components/Chat/MessageItem/index.vue

@@ -1,10 +1,13 @@
 <template>
 <template>
-  <section class="message-item-container w-full flex flex-col mt-[16px]" :class="msg.id === userStore.user.id ? 'right' : 'left'">
+  <section
+    class="message-item-container w-full flex flex-col mt-[16px]"
+    :class="msg.id === userStore.user.id ? 'right' : 'left'"
+  >
     <div class="first-line color-[#90A1AC] text-[18px]">
     <div class="first-line color-[#90A1AC] text-[18px]">
       <span v-if="msg.id !== '00002'">{{ msg.name }}</span>
       <span v-if="msg.id !== '00002'">{{ msg.name }}</span>
       <span class="ml-[40px]">{{ dayjs(msg.time).format('HH:mm') }}</span>
       <span class="ml-[40px]">{{ dayjs(msg.time).format('HH:mm') }}</span>
     </div>
     </div>
-    <div v-if="msg.text" class="mt-1 content-area">
+    <div v-if="msg.text" class="mt-[10px] content-area">
       <pre class="color-[#414D55] text-[16px]" v-html="ChatUtils.transform(msg.text)"></pre>
       <pre class="color-[#414D55] text-[16px]" v-html="ChatUtils.transform(msg.text)"></pre>
     </div>
     </div>
     <div v-if="msg.img" class="mt-[4px] content-area">
     <div v-if="msg.img" class="mt-[4px] content-area">

+ 0 - 1
src/views/information/manage/doc.vue

@@ -212,7 +212,6 @@ const submitForm = async (formEl: FormInstance | undefined) => {
         birthday: ruleForm.birthday,
         birthday: ruleForm.birthday,
         age: ruleForm.age,
         age: ruleForm.age,
         idCard: ruleForm.idCard,
         idCard: ruleForm.idCard,
-        education: ruleForm.education,
         career: ruleForm.career,
         career: ruleForm.career,
         practicingCertificateNumber: ruleForm.practicingCertificateNumber,
         practicingCertificateNumber: ruleForm.practicingCertificateNumber,
         seniority: ruleForm.seniority,
         seniority: ruleForm.seniority,

+ 1 - 1
src/views/tester/components/RehabilitationEvaluation/CognitiveAbilityTask/CognitiveAbilityTaskVisualTraining/components/mapWord/index.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
   <section class="auditory-word-img-matching-container flex-center flex-col wh-full relative">
   <section class="auditory-word-img-matching-container flex-center flex-col wh-full relative">
-    <water-title title="图匹配" />
+    <water-title title="图匹配" />
     <div v-if="isMainWin" class="text-[32px] text-[#0F308C]">
     <div v-if="isMainWin" class="text-[32px] text-[#0F308C]">
       {{ Topics.question }}
       {{ Topics.question }}
     </div>
     </div>

+ 80 - 13
src/views/tester/components/TesterPersonalInfo/index.vue

@@ -35,22 +35,24 @@
         </el-col>
         </el-col>
         <el-col :span="7">
         <el-col :span="7">
           <el-form-item label="学历" prop="education">
           <el-form-item label="学历" prop="education">
-            <el-select v-model="ruleForm.education" placeholder="请选择学历">
-              <el-option label="Zone one" value="shanghai" />
-              <el-option label="Zone two" value="beijing" />
-            </el-select>
+            <!--            <el-select v-model="ruleForm.education" placeholder="请选择学历">-->
+            <!--              <el-option label="Zone one" value="shanghai" />-->
+            <!--              <el-option label="Zone two" value="beijing" />-->
+            <el-input v-model="ruleForm.education" clearable />
+            <!--            </el-select>-->
           </el-form-item>
           </el-form-item>
           <el-form-item label="职业" prop="career">
           <el-form-item label="职业" prop="career">
-            <el-select-v2 v-model="ruleForm.career" placeholder="请选择职业" :options="options" />
+            <el-input v-model="ruleForm.career" clearable />
+            <!--            <el-select-v2 v-model="ruleForm.career" placeholder="请选择职业" :options="options" />-->
           </el-form-item>
           </el-form-item>
           <el-form-item label="爱好" prop="hobby">
           <el-form-item label="爱好" prop="hobby">
             <el-input v-model="ruleForm.hobby" clearable />
             <el-input v-model="ruleForm.hobby" clearable />
           </el-form-item>
           </el-form-item>
           <el-form-item label="利手" prop="handedness">
           <el-form-item label="利手" prop="handedness">
             <el-radio-group v-model="ruleForm.handedness">
             <el-radio-group v-model="ruleForm.handedness">
-              <el-radio value="0">左手</el-radio>
-              <el-radio value="1">右手</el-radio>
-              <el-radio value="2">左右手</el-radio>
+              <el-radio :value="0">左手</el-radio>
+              <el-radio :value="1">右手</el-radio>
+              <el-radio :value="2">左右手</el-radio>
             </el-radio-group>
             </el-radio-group>
           </el-form-item>
           </el-form-item>
           <el-form-item label="常住地址" prop="address">
           <el-form-item label="常住地址" prop="address">
@@ -76,9 +78,9 @@
               :on-exceed="handleExceed"
               :on-exceed="handleExceed"
               :show-file-list="false"
               :show-file-list="false"
             >
             >
-              <el-button type="primary" size="large">更换头像</el-button>
+              <!--              <el-button type="primary" size="large">更换头像</el-button>-->
               <template #tip>
               <template #tip>
-                <div class="el-upload__tip">500KB 以内的 jpg/png 文件</div>
+                <!--                <div class="el-upload__tip">500KB 以内的 jpg/png 文件</div>-->
               </template>
               </template>
             </el-upload>
             </el-upload>
           </div>
           </div>
@@ -101,6 +103,8 @@
  */
  */
 import { reactive, ref } from 'vue'
 import { reactive, ref } from 'vue'
 import type { FormInstance, FormRules, UploadProps, UploadUserFile } from 'element-plus'
 import type { FormInstance, FormRules, UploadProps, UploadUserFile } from 'element-plus'
+import UserAPI from '@/api/user'
+import { useUserStore } from '@/store'
 
 
 interface RuleForm {
 interface RuleForm {
   id: string
   id: string
@@ -116,8 +120,8 @@ interface RuleForm {
   address: string
   address: string
 }
 }
 
 
-const imgUrl = ref('https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg')
-
+const imgUrl = ref('static/image/user/default-avatar.png')
+const userStore = useUserStore()
 const ruleFormRef = ref<FormInstance>()
 const ruleFormRef = ref<FormInstance>()
 const ruleForm = reactive<RuleForm>({
 const ruleForm = reactive<RuleForm>({
   id: 'DKIN823KDE8234232323',
   id: 'DKIN823KDE8234232323',
@@ -151,11 +155,31 @@ const rules = reactive<FormRules<RuleForm>>({
   address: [{ required: true, message: '请输入常住地址', trigger: 'blur' }]
   address: [{ required: true, message: '请输入常住地址', trigger: 'blur' }]
 })
 })
 
 
-const submitForm = async (formEl: FormInstance | undefined) => {
+const submitForm = async (formEl: any) => {
   if (!formEl) return
   if (!formEl) return
   await formEl.validate((valid, fields) => {
   await formEl.validate((valid, fields) => {
     if (valid) {
     if (valid) {
       console.log('submit!')
       console.log('submit!')
+      console.log(ruleForm, '提交表单的数据')
+      let params = {
+        id: userStore.user.id,
+        code: ruleForm.id,
+        name: ruleForm.name,
+        note: ruleForm.nickName,
+        sex: ruleForm.sex,
+        age: ruleForm.age,
+        cardNo: ruleForm.idCard,
+        duration: ruleForm.education,
+        type: ruleForm.career,
+        title: ruleForm.hobby,
+        seniority: ruleForm.handedness,
+        department: ruleForm.address
+      }
+      UserAPI.update(params).then((response) => {
+        console.log(response, '更新')
+        ElMessage.success('更新成功')
+        getUserInfo()
+      })
     } else {
     } else {
       console.log('error submit!', fields)
       console.log('error submit!', fields)
     }
     }
@@ -173,6 +197,39 @@ const options = Array.from({ length: 10000 }).map((_, idx) => ({
 }))
 }))
 
 
 const fileList = ref<UploadUserFile[]>([])
 const fileList = ref<UploadUserFile[]>([])
+// 查询
+const getUserInfo = async () => {
+  console.log(userStore.user, 'userStore.user')
+  UserAPI.findById(userStore.user.id)
+    .then((data) => {
+      console.log(data, '124')
+      // const { sex, name } = toRefs(data)
+      // ruleForm.name = data.name
+      // ruleForm.sex = data.sex
+      // ruleForm.education = data.duration || '本科'
+      // ruleForm.type = data.depart || '医师'
+      // ruleForm.age = data.age || 18
+      // ruleForm.phone = data.phone
+      // ruleForm.nickName = data.note
+      // ruleForm.birthday = data.birthday || '2020-01-01'
+      // ruleForm.seniority = data.seniority || '0'
+      // ruleForm.title = data.title || '初级'
+      // ruleForm.seniority = data.seniority || '0'
+      // ruleForm.department = data.department || '儿科'
+      ruleForm.id = data.code
+      ruleForm.name = data.name
+      ruleForm.nickName = data.note
+      ruleForm.sex = data.sex
+      ruleForm.age = data.age
+      ruleForm.idCard = data.cardNo
+      ruleForm.education = data.duration
+      ruleForm.career = data.type || '程序员'
+      ruleForm.hobby = data.title
+      ruleForm.handedness = data.seniority || 0
+      ruleForm.address = data.department || '暂无'
+    })
+    .finally(() => {})
+}
 
 
 const handleRemove: UploadProps['onRemove'] = (file, uploadFiles) => {
 const handleRemove: UploadProps['onRemove'] = (file, uploadFiles) => {
   console.log(file, uploadFiles)
   console.log(file, uploadFiles)
@@ -196,6 +253,16 @@ const beforeRemove: UploadProps['beforeRemove'] = (uploadFile, uploadFiles) => {
     () => false
     () => false
   )
   )
 }
 }
+
+onMounted(() => {
+  nextTick(() => {
+    getUserInfo()
+    // ChatUtils.imageLoad('message-box')
+    // doctorInfo.value = $props.userInfos
+    // user_myDoctor()
+    // gQuerys()
+  })
+})
 </script>
 </script>
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">