lamphua 2 dni temu
rodzic
commit
eb69b93d01

+ 1
- 1
oa-back/ruoyi-agent/src/main/java/com/ruoyi/agent/service/impl/McpServiceImpl.java Wyświetl plik

220
      */
220
      */
221
     public String generateAnswer(String prompt) throws IOException {
221
     public String generateAnswer(String prompt) throws IOException {
222
         ChatModel chatModel = ChatModel.of(llmServiceUrl)
222
         ChatModel chatModel = ChatModel.of(llmServiceUrl)
223
-                .model("Qwen2.5-7B-Instruct")
223
+                .model("Qwen2.5")
224
                 .build();
224
                 .build();
225
 
225
 
226
         List<ChatMessage> messages = new ArrayList<>();
226
         List<ChatMessage> messages = new ArrayList<>();

+ 1
- 1
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/controller/McpController.java Wyświetl plik

60
                 .url("http://localhost:8080/mcp/sse")
60
                 .url("http://localhost:8080/mcp/sse")
61
                 .build();
61
                 .build();
62
         ChatModel chatModel = ChatModel.of(llmServiceUrl)
62
         ChatModel chatModel = ChatModel.of(llmServiceUrl)
63
-                .model("Qwen2.5-7B-Instruct")
63
+                .model("Qwen2.5")
64
                 .defaultToolsAdd(clientProvider)
64
                 .defaultToolsAdd(clientProvider)
65
                 .build();
65
                 .build();
66
 
66
 

+ 1
- 1
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/controller/SessionController.java Wyświetl plik

55
                 .url("http://localhost:8080/mcp/sse")
55
                 .url("http://localhost:8080/mcp/sse")
56
                 .build();
56
                 .build();
57
         ChatModel chatModel = ChatModel.of(llmServiceUrl)
57
         ChatModel chatModel = ChatModel.of(llmServiceUrl)
58
-                .model("Qwen2.5-7B-Instruct")
58
+                .model("Qwen2.5")
59
                 .defaultToolsAdd(clientProvider)
59
                 .defaultToolsAdd(clientProvider)
60
                 .build();
60
                 .build();
61
 
61
 

+ 1
- 1
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/service/impl/LangChainMilvusServiceImpl.java Wyświetl plik

244
     public Flux<AssistantMessage> generateAnswer(String topicId, String prompt) {
244
     public Flux<AssistantMessage> generateAnswer(String topicId, String prompt) {
245
         ChatModel chatModel = ChatModel.of(llmServiceUrl)
245
         ChatModel chatModel = ChatModel.of(llmServiceUrl)
246
 
246
 
247
-                .model("Qwen2.5-7B-Instruct")
247
+                .model("Qwen2.5")
248
                 .build();
248
                 .build();
249
 
249
 
250
         List<ChatMessage> messages = new ArrayList<>();
250
         List<ChatMessage> messages = new ArrayList<>();

+ 1
- 1
oa-back/ruoyi-system/src/main/java/com/ruoyi/llm/service/impl/CmcAgentServiceImpl.java Wyświetl plik

644
      */
644
      */
645
     public String generateAnswer(String prompt) throws IOException {
645
     public String generateAnswer(String prompt) throws IOException {
646
         ChatModel chatModel = ChatModel.of(llmServiceUrl)
646
         ChatModel chatModel = ChatModel.of(llmServiceUrl)
647
-                .model("Qwen2.5-7B-Instruct")
647
+                .model("Qwen2.5")
648
                 .build();
648
                 .build();
649
 
649
 
650
         List<ChatMessage> messages = new ArrayList<>();
650
         List<ChatMessage> messages = new ArrayList<>();

+ 1
- 0
oa-back/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml Wyświetl plik

40
 				AND create_by like concat('%', #{createBy}, '%')
40
 				AND create_by like concat('%', #{createBy}, '%')
41
 			</if>
41
 			</if>
42
 		</where>
42
 		</where>
43
+		order by update_time desc
43
     </select>
44
     </select>
44
     
45
     
45
     <insert id="insertNotice" parameterType="SysNotice">
46
     <insert id="insertNotice" parameterType="SysNotice">

BIN
oa-ui/src/assets/images/female.png Wyświetl plik


+ 5
- 1
oa-ui/src/store/modules/user.js Wyświetl plik

73
       return new Promise((resolve, reject) => {
73
       return new Promise((resolve, reject) => {
74
         getInfo().then(res => {
74
         getInfo().then(res => {
75
           const user = res.user
75
           const user = res.user
76
-          const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/user.png") : process.env.VUE_APP_BASE_API + user.avatar;
76
+          let avatar = require("@/assets/images/user.png")
77
+          if (user.avatar == "" || user.avatar == null)
78
+            avatar = user.sex == '0' ? avatar : require("@/assets/images/female.png")
79
+          else
80
+            avatar = process.env.VUE_APP_BASE_API + user.avatar;
77
           if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
81
           if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
78
             commit('SET_ROLES', res.roles)
82
             commit('SET_ROLES', res.roles)
79
             commit('SET_PERMISSIONS', res.permissions)
83
             commit('SET_PERMISSIONS', res.permissions)

+ 0
- 1
oa-ui/src/utils/ruoyi.js Wyświetl plik

88
 
88
 
89
 // 回显数据字典(字符串、数组)
89
 // 回显数据字典(字符串、数组)
90
 export function selectDictLabels(datas, value, separator) {
90
 export function selectDictLabels(datas, value, separator) {
91
-  console.log(value);
92
   if (value === undefined || value === null || value.length === 0) {
91
   if (value === undefined || value === null || value.length === 0) {
93
     return "";
92
     return "";
94
   }
93
   }

+ 10
- 2
oa-ui/src/views/oa/staff/changeRecord.vue Wyświetl plik

2
  * @Author: wrh
2
  * @Author: wrh
3
  * @Date: 2024-03-25 17:38:39
3
  * @Date: 2024-03-25 17:38:39
4
  * @LastEditors: wrh
4
  * @LastEditors: wrh
5
- * @LastEditTime: 2025-09-29 09:29:14
5
+ * @LastEditTime: 2026-02-27 11:09:08
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div>
8
   <div>
38
 import { parseTime } from "@/utils/ruoyi";
38
 import { parseTime } from "@/utils/ruoyi";
39
 import { getUserChangeInfo } from "@/api/system/user";
39
 import { getUserChangeInfo } from "@/api/system/user";
40
 export default {
40
 export default {
41
+  props: {
42
+    userId: {
43
+      type: Number
44
+    }
45
+  },
41
   dicts: ['sys_user_titles', 'sys_post_status', 'sys_user_certificates', 'sys_user_pmlevel', 'sys_user_engineerlevel', 'sys_user_operatorlevel', 'sys_user_postlevel', 'sys_user_salarylevel', 'sys_user_political', 'sys_user_degree'],
46
   dicts: ['sys_user_titles', 'sys_post_status', 'sys_user_certificates', 'sys_user_pmlevel', 'sys_user_engineerlevel', 'sys_user_operatorlevel', 'sys_user_postlevel', 'sys_user_salarylevel', 'sys_user_political', 'sys_user_degree'],
42
   data() {
47
   data() {
43
     return {
48
     return {
76
     /** 查询变更记录列表 */
81
     /** 查询变更记录列表 */
77
     getChangeRecordList() {
82
     getChangeRecordList() {
78
       this.loading = true;
83
       this.loading = true;
79
-      this.queryParams.userId = Number(this.$route.query.userId);
84
+      if (this.$route.query.userId)
85
+        this.queryParams.userId = this.$route.query.userId;
86
+      else
87
+        this.queryParams.userId = this.userId;
80
       getUserChangeInfo(this.queryParams).then(response => {
88
       getUserChangeInfo(this.queryParams).then(response => {
81
         this.changeRecordList = response.rows;
89
         this.changeRecordList = response.rows;
82
         this.filteredData = this.changeRecordList;
90
         this.filteredData = this.changeRecordList;

+ 8
- 7
oa-ui/src/views/oa/staff/info.vue Wyświetl plik

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-03-22 14:50:46
3
  * @Date: 2024-03-22 14:50:46
4
  * @LastEditors: wrh
4
  * @LastEditors: wrh
5
- * @LastEditTime: 2025-11-18 15:52:46
5
+ * @LastEditTime: 2026-02-27 15:08:59
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="bg" v-loading="loading">
8
   <div class="bg" v-loading="loading">
150
       getUser(id).then(res => {
150
       getUser(id).then(res => {
151
         this.postOptions = res.posts;
151
         this.postOptions = res.posts;
152
         if (res.data) {
152
         if (res.data) {
153
-        this.avatar =  (res.data.avatar == "" || res.data.avatar == null) ? require("@/assets/images/user.png") : process.env.VUE_APP_BASE_API + res.data.avatar;
153
+          this.avatar = require("@/assets/images/user.png")
154
+          if (res.data.avatar == "" || res.data.avatar == null)
155
+            this.avatar = res.data.sex == '0' ? this.avatar : require("@/assets/images/female.png")
156
+          else
157
+            this.avatar = process.env.VUE_APP_BASE_API + res.data.avatar;
154
           this.form = res.data;
158
           this.form = res.data;
155
           this.formartForm(res);
159
           this.formartForm(res);
156
           this.userInfo = [
160
           this.userInfo = [
273
       this.$router.push({ path: '/oa/staff/people' });
277
       this.$router.push({ path: '/oa/staff/people' });
274
     },
278
     },
275
     getAgeByIdCard(idCard) {
279
     getAgeByIdCard(idCard) {
276
-      const sexAndAge = {}
277
       //获取用户身份证号码
280
       //获取用户身份证号码
278
       const userCard = idCard
281
       const userCard = idCard
279
       //如果用户身份证号码为undefined则返回空
282
       //如果用户身份证号码为undefined则返回空
280
       if (!userCard) {
283
       if (!userCard) {
281
-        return sexAndAge
284
+        return 0
282
       }
285
       }
283
       // 获取出生日期
286
       // 获取出生日期
284
       const yearBirth = userCard.substring(6, 10)
287
       const yearBirth = userCard.substring(6, 10)
293
       if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) {
296
       if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) {
294
         age--
297
         age--
295
       }
298
       }
296
-      // 得到年龄
297
-      sexAndAge.age = age
298
-      return sexAndAge.age
299
+      return age
299
     },
300
     },
300
   }
301
   }
301
 }
302
 }

+ 11
- 3
oa-ui/src/views/oa/staff/participate.vue Wyświetl plik

1
 <!--
1
 <!--
2
  * @Author: wrh
2
  * @Author: wrh
3
  * @Date: 2024-03-25 17:38:39
3
  * @Date: 2024-03-25 17:38:39
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-10-25 17:01:50
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2026-02-27 11:08:31
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div>
8
   <div>
39
 import { listProject } from "@/api/oa/project/project";
39
 import { listProject } from "@/api/oa/project/project";
40
 import { listDeclare } from "@/api/oa/declare/declare"
40
 import { listDeclare } from "@/api/oa/declare/declare"
41
 export default {
41
 export default {
42
+  props: {
43
+    userId: {
44
+      type: Number
45
+    }
46
+  },
42
   data() {
47
   data() {
43
     return {
48
     return {
44
       // 查询参数
49
       // 查询参数
79
       this.getDeclareList();
84
       this.getDeclareList();
80
     },
85
     },
81
     getListByPaticipates() {
86
     getListByPaticipates() {
82
-      this.queryParams.participates = this.$route.query.userId;
87
+      if (this.$route.query.userId)
88
+        this.queryParams.participates = this.$route.query.userId;
89
+      else
90
+        this.queryParams.participates = this.userId;
83
       listProject(this.queryParams).then(res => {
91
       listProject(this.queryParams).then(res => {
84
         this.tableData = res.rows
92
         this.tableData = res.rows
85
         this.total = res.total
93
         this.total = res.total

+ 11
- 3
oa-ui/src/views/oa/staff/projectInfo.vue Wyświetl plik

1
 <!--
1
 <!--
2
  * @Author: wrh
2
  * @Author: wrh
3
  * @Date: 2024-03-25 17:38:39
3
  * @Date: 2024-03-25 17:38:39
4
- * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-10-25 14:30:36
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2026-02-27 11:09:38
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div>
8
   <div>
50
 
50
 
51
 import { listProject } from "@/api/oa/project/project";
51
 import { listProject } from "@/api/oa/project/project";
52
 export default {
52
 export default {
53
+  props: {
54
+    userId: {
55
+      type: Number
56
+    }
57
+  },
53
   data() {
58
   data() {
54
     return {
59
     return {
55
       // 查询参数
60
       // 查询参数
72
 
77
 
73
     },
78
     },
74
     getListByProjectLeader() {
79
     getListByProjectLeader() {
75
-      this.queryParams.projectLeader = this.$route.query.userId;
80
+      if (this.$route.query.userId)
81
+        this.queryParams.projectLeader = this.$route.query.userId;
82
+      else
83
+        this.queryParams.projectLeader = this.userId;
76
       listProject(this.queryParams).then(res => {
84
       listProject(this.queryParams).then(res => {
77
         this.tableData = res.rows
85
         this.tableData = res.rows
78
         this.total = res.total
86
         this.total = res.total

+ 242
- 30
oa-ui/src/views/system/user/profile/index.vue Wyświetl plik

1
 <template>
1
 <template>
2
   <div class="app-container">
2
   <div class="app-container">
3
     <el-row :gutter="20">
3
     <el-row :gutter="20">
4
-      <el-col :span="6" :xs="24">
4
+      <el-col :span="8" :xs="24" class="userInfo">
5
         <el-card class="box-card">
5
         <el-card class="box-card">
6
           <div slot="header" class="clearfix">
6
           <div slot="header" class="clearfix">
7
             <span>个人信息</span>
7
             <span>个人信息</span>
9
           <div>
9
           <div>
10
             <div class="text-center">
10
             <div class="text-center">
11
               <userAvatar />
11
               <userAvatar />
12
+              <div class="user-name">{{ user.nickName }}</div>
13
+              <div class="user-sex">
14
+                <span class="mr10">{{ getAgeByIdCard(user.idCard) + '岁' }} {{ user.sex == '0' ? ' 男' : ' 女' }}</span>
15
+                <el-tag type="success" v-if="user.status == '0'">在职</el-tag>
16
+                <el-tag type="danger" v-if="user.status == '1'">离职</el-tag>
17
+                <el-tag type="warning" v-if="user.status == '2'">退休</el-tag>
18
+                <el-tag type="primary" v-if="user.status == '3'">试用</el-tag>
19
+                <el-tag type="info" v-if="user.status == '4'">返聘</el-tag>
20
+              </div>
21
+
22
+              <div class="info-item" v-for="item in userInfo">
23
+                <div class="item-label" v-if="item.value != '' && item.value != undefined">
24
+                  <svg-icon :icon-class="item.icon" class="info-icon"></svg-icon>
25
+                  <div class="item-label">{{ item.label }}</div>
26
+                </div>
27
+                <div>{{ item.value }}</div>
28
+              </div>
12
             </div>
29
             </div>
13
-            <ul class="list-group list-group-striped">
14
-              <li class="list-group-item">
15
-                <svg-icon icon-class="user" />用户名称
16
-                <div class="pull-right">{{ user.userName }}</div>
17
-              </li>
18
-              <li class="list-group-item">
19
-                <svg-icon icon-class="phone" />手机号码
20
-                <div class="pull-right">{{ user.phonenumber }}</div>
21
-              </li>
22
-              <li class="list-group-item">
23
-                <svg-icon icon-class="email" />用户邮箱
24
-                <div class="pull-right">{{ user.email }}</div>
25
-              </li>
26
-              <li class="list-group-item">
27
-                <svg-icon icon-class="tree" />所属部门
28
-                <div class="pull-right" v-if="user.dept">{{ user.dept.deptName }} / {{ postGroup }}</div>
29
-              </li>
30
-              <li class="list-group-item">
31
-                <svg-icon icon-class="peoples" />所属角色
32
-                <div class="pull-right">{{ roleGroup }}</div>
33
-              </li>
34
-              <li class="list-group-item">
35
-                <svg-icon icon-class="date" />创建日期
36
-                <div class="pull-right">{{ user.createTime }}</div>
37
-              </li>
38
-            </ul>
39
           </div>
30
           </div>
40
         </el-card>
31
         </el-card>
41
       </el-col>
32
       </el-col>
42
-      <el-col :span="18" :xs="24">
33
+      <el-col :span="16" :xs="24" class="stateInfo">
43
         <el-card>
34
         <el-card>
44
           <div slot="header" class="clearfix">
35
           <div slot="header" class="clearfix">
45
             <span>基本资料</span>
36
             <span>基本资料</span>
51
             <el-tab-pane label="修改密码" name="resetPwd">
42
             <el-tab-pane label="修改密码" name="resetPwd">
52
               <resetPwd />
43
               <resetPwd />
53
             </el-tab-pane>
44
             </el-tab-pane>
45
+            <el-tab-pane label="负责项目" name="0">
46
+              <projectInfo :userId="userId"></projectInfo>
47
+            </el-tab-pane>
48
+            <el-tab-pane label="参与项目" name="1">
49
+              <participate :userId="userId"></participate>
50
+            </el-tab-pane>
51
+            <el-tab-pane label="变更记录" name="2">
52
+              <changeRecord :userId="userId"></changeRecord>
53
+            </el-tab-pane>
54
           </el-tabs>
54
           </el-tabs>
55
         </el-card>
55
         </el-card>
56
       </el-col>
56
       </el-col>
63
 import userInfo from "./userInfo";
63
 import userInfo from "./userInfo";
64
 import resetPwd from "./resetPwd";
64
 import resetPwd from "./resetPwd";
65
 import { getUserProfile } from "@/api/system/user";
65
 import { getUserProfile } from "@/api/system/user";
66
+import projectInfo from '@/views/oa/staff/projectInfo'
67
+import participate from '@/views/oa/staff/participate'
68
+import changeRecord from '@/views/oa/staff/changeRecord'
66
 
69
 
67
 export default {
70
 export default {
68
   name: "Profile",
71
   name: "Profile",
69
-  components: { userAvatar, userInfo, resetPwd },
72
+  components: { userAvatar, userInfo, resetPwd, projectInfo, participate, changeRecord },
73
+  dicts: ['sys_normal_disable', 'sys_user_sex', 'sys_user_titles', 'sys_user_certificates', 'sys_user_pmlevel',
74
+    'sys_user_postlevel', 'sys_user_salarylevel', 'sys_user_political', 'sys_user_degree', 'sys_user_engineerlevel', 'sys_user_operatorlevel'], 
70
   data() {
75
   data() {
71
     return {
76
     return {
72
       user: {},
77
       user: {},
78
+      userId: this.$store.getters.userId,
73
       roleGroup: {},
79
       roleGroup: {},
74
       postGroup: {},
80
       postGroup: {},
81
+      userInfo: [],
75
       activeTab: "userinfo"
82
       activeTab: "userinfo"
76
     };
83
     };
77
   },
84
   },
84
         this.user = response.data;
91
         this.user = response.data;
85
         this.roleGroup = response.roleGroup;
92
         this.roleGroup = response.roleGroup;
86
         this.postGroup = response.postGroup;
93
         this.postGroup = response.postGroup;
94
+        this.userInfo = [
95
+          {
96
+            label: '部门:',
97
+            icon: 'dept',
98
+            value: this.user.dept ? this.user.dept.deptName : ''
99
+          },
100
+          {
101
+            label: '职务:',
102
+            icon: 'dept',
103
+            value: this.postGroup
104
+          },
105
+          {
106
+            label: '联系电话:',
107
+            icon: 'phone',
108
+            value: this.user.phonenumber
109
+          },
110
+          {
111
+            label: '薪资岗级:',
112
+            icon: 'postSalary',
113
+            value: this.selectDictLabel(this.dict.type.sys_user_postlevel, this.user.postLevel) + this.selectDictLabel(this.dict.type.sys_user_salarylevel, this.user.salaryLevel)
114
+          },
115
+          {
116
+            label: '入职时间:',
117
+            icon: 'date',
118
+            value: this.parseTime(this.user.entryDate, '{y}-{m}')
119
+          },
120
+          {
121
+            label: '技术职称:',
122
+            icon: 'titles',
123
+            value: this.user.titles != null ? this.selectDictLabels(this.dict.type.sys_user_titles, this.user.titles, ',') : ''
124
+          },
125
+          {
126
+            label: '职称专业:',
127
+            icon: 'titles',
128
+            value: this.user.titleProfession
129
+          },
130
+          {
131
+            label: '职业资格:',
132
+            icon: 'certificate',
133
+            value: this.user.certificates != null ? this.selectDictLabels(this.dict.type.sys_user_certificates, this.user.certificates, ',') : ''
134
+          },
135
+          {
136
+            label: '工程师岗级:',
137
+            icon: 'engineer',
138
+            value: this.selectDictLabel(this.dict.type.sys_user_engineerlevel, this.user.engineerLevel)
139
+          },
140
+          {
141
+            label: '技工等级:',
142
+            icon: 'operator',
143
+            value: this.selectDictLabel(this.dict.type.sys_user_operatorlevel, this.user.operatorLevel)
144
+          },
145
+          {
146
+            label: '项目经理级别:',
147
+            icon: 'pmLevel',
148
+            value: this.selectDictLabel(this.dict.type.sys_user_pmlevel, this.user.pmLevel)
149
+          },
150
+          {
151
+            label: '身份证号码:',
152
+            icon: 'idCard',
153
+            value: this.user.idCard
154
+          },
155
+          {
156
+            label: '籍贯:',
157
+            icon: 'place',
158
+            value: this.user.nativePlace
159
+          },
160
+          {
161
+            label: '政治面貌:',
162
+            icon: 'politicalAffiliation',
163
+            value: this.selectDictLabels(this.dict.type.sys_user_political, this.user.politicalAffiliation, ',')
164
+          },
165
+          {
166
+            label: '民族:',
167
+            icon: 'flower',
168
+            value: this.user.ethnic
169
+          },
170
+          {
171
+            label: '最高学历毕业院校:',
172
+            icon: 'school',
173
+            value: this.user.graduateSchool
174
+          },
175
+          {
176
+            label: '最高学历专业:',
177
+            icon: 'major',
178
+            value: this.user.major
179
+          },
180
+          {
181
+            label: '最高学历:',
182
+            icon: 'degree',
183
+            value: this.selectDictLabel(this.dict.type.sys_user_degree, this.user.degree)
184
+          },
185
+          {
186
+            label: '初始学历毕业院校:',
187
+            icon: 'school',
188
+            value: this.user.initialSchool
189
+          },
190
+          {
191
+            label: '初始学历专业:',
192
+            icon: 'major',
193
+            value: this.user.initialMajor
194
+          },
195
+          {
196
+            label: '初始学历:',
197
+            icon: 'degree',
198
+            value: this.selectDictLabel(this.dict.type.sys_user_degree, this.user.initialDegree)
199
+          },
200
+          {
201
+            label: '合同签订:',
202
+            icon: 'contractSign',
203
+            value: this.parseTime(this.user.contractSign, '{y}-{m}-{d}')
204
+          },
205
+          {
206
+            label: '合同期满:',
207
+            icon: 'contractExpire',
208
+            value: this.parseTime(this.user.contractExpire, '{y}-{m}-{d}')
209
+          },
210
+          {
211
+            label: '家庭住址:',
212
+            icon: 'homePlace',
213
+            value: this.user.homePlace
214
+          },
215
+          {
216
+            label: '紧急联系方式:',
217
+            icon: 'user',
218
+            value: this.user.contact ? this.user.contact : '' + this.user.telephone ? this.user.telephone : ''
219
+          },
220
+          {
221
+            label: '备注:',
222
+            icon: 'log',
223
+            value: this.user.remark
224
+          },
225
+        ]
87
       });
226
       });
88
-    }
227
+    },
228
+    getAgeByIdCard(idCard) {
229
+      //获取用户身份证号码
230
+      const userCard = idCard
231
+      //如果用户身份证号码为undefined则返回空
232
+      if (!userCard) {
233
+        return 0
234
+      }
235
+      // 获取出生日期
236
+      const yearBirth = userCard.substring(6, 10)
237
+      const monthBirth = userCard.substring(10, 12)
238
+      const dayBirth = userCard.substring(12, 14)
239
+      // 获取当前年月日并计算年龄
240
+      const myDate = new Date()
241
+      const monthNow = myDate.getMonth() + 1
242
+      const dayNow = myDate.getDate()
243
+      let age = myDate.getFullYear() - yearBirth
244
+
245
+      if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) {
246
+        age--
247
+      }
248
+      return age
249
+    },
89
   }
250
   }
90
 };
251
 };
91
 </script>
252
 </script>
253
+
254
+<style lang="scss" scoped>
255
+.userInfo {
256
+  background-color: #fff;
257
+  height: 1000px;
258
+  padding: 5px;
259
+
260
+  .user-name {
261
+    font-size: 18px;
262
+    font-weight: bold;
263
+  }
264
+
265
+  .user-sex {
266
+    line-height: 30px;
267
+    font-size: 14px;
268
+    color: #797979;
269
+  }
270
+
271
+  .info-item {
272
+    line-height: 30px;
273
+    color: #5A5A5A;
274
+    font-size: 14px;
275
+    padding-left: 30px;
276
+    display: flex;
277
+    align-items: flex-start;
278
+
279
+    .info-icon {
280
+      font-size: 20px;
281
+      margin-right: 10px;
282
+      vertical-align: middle;
283
+    }
284
+
285
+    .item-label {
286
+      max-width: 156px;
287
+      display: flex;
288
+      align-items: center;
289
+      font-family: '微软雅黑';
290
+      font-weight: bold;
291
+      // text-align: right;
292
+      // display: inline-block;
293
+    }
294
+  }
295
+}
296
+
297
+.stateInfo {
298
+  background-color: #fff;
299
+  height: 1000px;
300
+  overflow-y: scroll;
301
+  padding: 10px 30px 0;
302
+}
303
+</style>

+ 34
- 10
oa-ui/src/views/system/user/profile/userInfo.vue Wyświetl plik

1
+<!--
2
+ * @Author: wrh
3
+ * @Date: 2024-01-03 08:55:38
4
+ * @LastEditors: wrh
5
+ * @LastEditTime: 2026-02-27 11:34:24
6
+-->
1
 <template>
7
 <template>
2
-  <el-form ref="form" :model="form" :rules="rules" label-width="80px">
8
+  <el-form ref="form" :model="form" :rules="rules" label-width="100px">
3
     <el-form-item label="用户昵称" prop="nickName">
9
     <el-form-item label="用户昵称" prop="nickName">
4
       <el-input v-model="form.nickName" maxlength="30" />
10
       <el-input v-model="form.nickName" maxlength="30" />
5
     </el-form-item> 
11
     </el-form-item> 
6
     <el-form-item label="手机号码" prop="phonenumber">
12
     <el-form-item label="手机号码" prop="phonenumber">
7
       <el-input v-model="form.phonenumber" maxlength="11" />
13
       <el-input v-model="form.phonenumber" maxlength="11" />
8
     </el-form-item>
14
     </el-form-item>
9
-    <el-form-item label="邮箱" prop="email">
15
+    <!-- <el-form-item label="邮箱" prop="email">
10
       <el-input v-model="form.email" maxlength="50" />
16
       <el-input v-model="form.email" maxlength="50" />
11
     </el-form-item>
17
     </el-form-item>
12
     <el-form-item label="性别">
18
     <el-form-item label="性别">
14
         <el-radio label="0">男</el-radio>
20
         <el-radio label="0">男</el-radio>
15
         <el-radio label="1">女</el-radio>
21
         <el-radio label="1">女</el-radio>
16
       </el-radio-group>
22
       </el-radio-group>
23
+    </el-form-item> -->
24
+    <el-form-item label="家庭住址" prop="homePlace">
25
+      <el-input v-model="form.homePlace" maxlength="100" />
26
+    </el-form-item>
27
+    <el-form-item label="紧急联系人" prop="contact">
28
+      <el-input v-model="form.contact" maxlength="30" />
29
+    </el-form-item>
30
+    <el-form-item label="紧急联系电话" prop="telephone">
31
+      <el-input v-model="form.telephone" maxlength="11" />
17
     </el-form-item>
32
     </el-form-item>
18
     <el-form-item>
33
     <el-form-item>
19
       <el-button type="primary" size="mini" @click="submit">保存</el-button>
34
       <el-button type="primary" size="mini" @click="submit">保存</el-button>
39
         nickName: [
54
         nickName: [
40
           { required: true, message: "用户昵称不能为空", trigger: "blur" }
55
           { required: true, message: "用户昵称不能为空", trigger: "blur" }
41
         ],
56
         ],
42
-        email: [
43
-          { required: true, message: "邮箱地址不能为空", trigger: "blur" },
44
-          {
45
-            type: "email",
46
-            message: "请输入正确的邮箱地址",
47
-            trigger: ["blur", "change"]
48
-          }
57
+        // email: [
58
+        //   { required: false, message: "邮箱地址不能为空", trigger: "blur" },
59
+        //   {
60
+        //     type: "email",
61
+        //     message: "请输入正确的邮箱地址",
62
+        //     trigger: ["blur", "change"]
63
+        //   }
64
+        // ],
65
+        homePlace: [
66
+          { required: true, message: "家庭住址不能为空", trigger: "blur" }
67
+        ],
68
+        contact: [
69
+          { required: true, message: "紧急联系人不能为空", trigger: "blur" }
70
+        ],
71
+        telephone: [
72
+          { required: true, message: "紧急联系电话不能为空", trigger: "blur" }
49
         ],
73
         ],
50
         phonenumber: [
74
         phonenumber: [
51
           { required: true, message: "手机号码不能为空", trigger: "blur" },
75
           { required: true, message: "手机号码不能为空", trigger: "blur" },
62
     user: {
86
     user: {
63
       handler(user) {
87
       handler(user) {
64
         if (user) {
88
         if (user) {
65
-          this.form = { nickName: user.nickName, phonenumber: user.phonenumber, email: user.email, sex: user.sex };
89
+          this.form = { nickName: user.nickName, phonenumber: user.phonenumber, email: user.email, sex: user.sex, contact: user.contact, telephone: user.telephone, homePlace: user.homePlace };
66
         }
90
         }
67
       },
91
       },
68
       immediate: true
92
       immediate: true

Ładowanie…
Anuluj
Zapisz