lamphua 2日前
コミット
eb69b93d01

+ 1
- 1
oa-back/ruoyi-agent/src/main/java/com/ruoyi/agent/service/impl/McpServiceImpl.java ファイルの表示

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

+ 1
- 1
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/controller/McpController.java ファイルの表示

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

+ 1
- 1
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/controller/SessionController.java ファイルの表示

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

+ 1
- 1
oa-back/ruoyi-llm/src/main/java/com/ruoyi/web/llm/service/impl/LangChainMilvusServiceImpl.java ファイルの表示

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

+ 1
- 1
oa-back/ruoyi-system/src/main/java/com/ruoyi/llm/service/impl/CmcAgentServiceImpl.java ファイルの表示

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

+ 1
- 0
oa-back/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml ファイルの表示

@@ -40,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
40 40
 				AND create_by like concat('%', #{createBy}, '%')
41 41
 			</if>
42 42
 		</where>
43
+		order by update_time desc
43 44
     </select>
44 45
     
45 46
     <insert id="insertNotice" parameterType="SysNotice">

バイナリ
oa-ui/src/assets/images/female.png ファイルの表示


+ 5
- 1
oa-ui/src/store/modules/user.js ファイルの表示

@@ -73,7 +73,11 @@ const user = {
73 73
       return new Promise((resolve, reject) => {
74 74
         getInfo().then(res => {
75 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 81
           if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
78 82
             commit('SET_ROLES', res.roles)
79 83
             commit('SET_PERMISSIONS', res.permissions)

+ 0
- 1
oa-ui/src/utils/ruoyi.js ファイルの表示

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

+ 10
- 2
oa-ui/src/views/oa/staff/changeRecord.vue ファイルの表示

@@ -2,7 +2,7 @@
2 2
  * @Author: wrh
3 3
  * @Date: 2024-03-25 17:38:39
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2025-09-29 09:29:14
5
+ * @LastEditTime: 2026-02-27 11:09:08
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -38,6 +38,11 @@
38 38
 import { parseTime } from "@/utils/ruoyi";
39 39
 import { getUserChangeInfo } from "@/api/system/user";
40 40
 export default {
41
+  props: {
42
+    userId: {
43
+      type: Number
44
+    }
45
+  },
41 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 47
   data() {
43 48
     return {
@@ -76,7 +81,10 @@ export default {
76 81
     /** 查询变更记录列表 */
77 82
     getChangeRecordList() {
78 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 88
       getUserChangeInfo(this.queryParams).then(response => {
81 89
         this.changeRecordList = response.rows;
82 90
         this.filteredData = this.changeRecordList;

+ 8
- 7
oa-ui/src/views/oa/staff/info.vue ファイルの表示

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-22 14:50:46
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2025-11-18 15:52:46
5
+ * @LastEditTime: 2026-02-27 15:08:59
6 6
 -->
7 7
 <template>
8 8
   <div class="bg" v-loading="loading">
@@ -150,7 +150,11 @@ export default {
150 150
       getUser(id).then(res => {
151 151
         this.postOptions = res.posts;
152 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 158
           this.form = res.data;
155 159
           this.formartForm(res);
156 160
           this.userInfo = [
@@ -273,12 +277,11 @@ export default {
273 277
       this.$router.push({ path: '/oa/staff/people' });
274 278
     },
275 279
     getAgeByIdCard(idCard) {
276
-      const sexAndAge = {}
277 280
       //获取用户身份证号码
278 281
       const userCard = idCard
279 282
       //如果用户身份证号码为undefined则返回空
280 283
       if (!userCard) {
281
-        return sexAndAge
284
+        return 0
282 285
       }
283 286
       // 获取出生日期
284 287
       const yearBirth = userCard.substring(6, 10)
@@ -293,9 +296,7 @@ export default {
293 296
       if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) {
294 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 ファイルの表示

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: wrh
3 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 7
 <template>
8 8
   <div>
@@ -39,6 +39,11 @@
39 39
 import { listProject } from "@/api/oa/project/project";
40 40
 import { listDeclare } from "@/api/oa/declare/declare"
41 41
 export default {
42
+  props: {
43
+    userId: {
44
+      type: Number
45
+    }
46
+  },
42 47
   data() {
43 48
     return {
44 49
       // 查询参数
@@ -79,7 +84,10 @@ export default {
79 84
       this.getDeclareList();
80 85
     },
81 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 91
       listProject(this.queryParams).then(res => {
84 92
         this.tableData = res.rows
85 93
         this.total = res.total

+ 11
- 3
oa-ui/src/views/oa/staff/projectInfo.vue ファイルの表示

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: wrh
3 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 7
 <template>
8 8
   <div>
@@ -50,6 +50,11 @@
50 50
 
51 51
 import { listProject } from "@/api/oa/project/project";
52 52
 export default {
53
+  props: {
54
+    userId: {
55
+      type: Number
56
+    }
57
+  },
53 58
   data() {
54 59
     return {
55 60
       // 查询参数
@@ -72,7 +77,10 @@ export default {
72 77
 
73 78
     },
74 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 84
       listProject(this.queryParams).then(res => {
77 85
         this.tableData = res.rows
78 86
         this.total = res.total

+ 242
- 30
oa-ui/src/views/system/user/profile/index.vue ファイルの表示

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="app-container">
3 3
     <el-row :gutter="20">
4
-      <el-col :span="6" :xs="24">
4
+      <el-col :span="8" :xs="24" class="userInfo">
5 5
         <el-card class="box-card">
6 6
           <div slot="header" class="clearfix">
7 7
             <span>个人信息</span>
@@ -9,37 +9,28 @@
9 9
           <div>
10 10
             <div class="text-center">
11 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 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 30
           </div>
40 31
         </el-card>
41 32
       </el-col>
42
-      <el-col :span="18" :xs="24">
33
+      <el-col :span="16" :xs="24" class="stateInfo">
43 34
         <el-card>
44 35
           <div slot="header" class="clearfix">
45 36
             <span>基本资料</span>
@@ -51,6 +42,15 @@
51 42
             <el-tab-pane label="修改密码" name="resetPwd">
52 43
               <resetPwd />
53 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 54
           </el-tabs>
55 55
         </el-card>
56 56
       </el-col>
@@ -63,15 +63,22 @@ import userAvatar from "./userAvatar";
63 63
 import userInfo from "./userInfo";
64 64
 import resetPwd from "./resetPwd";
65 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 70
 export default {
68 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 75
   data() {
71 76
     return {
72 77
       user: {},
78
+      userId: this.$store.getters.userId,
73 79
       roleGroup: {},
74 80
       postGroup: {},
81
+      userInfo: [],
75 82
       activeTab: "userinfo"
76 83
     };
77 84
   },
@@ -84,8 +91,213 @@ export default {
84 91
         this.user = response.data;
85 92
         this.roleGroup = response.roleGroup;
86 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 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 ファイルの表示

@@ -1,12 +1,18 @@
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 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 9
     <el-form-item label="用户昵称" prop="nickName">
4 10
       <el-input v-model="form.nickName" maxlength="30" />
5 11
     </el-form-item> 
6 12
     <el-form-item label="手机号码" prop="phonenumber">
7 13
       <el-input v-model="form.phonenumber" maxlength="11" />
8 14
     </el-form-item>
9
-    <el-form-item label="邮箱" prop="email">
15
+    <!-- <el-form-item label="邮箱" prop="email">
10 16
       <el-input v-model="form.email" maxlength="50" />
11 17
     </el-form-item>
12 18
     <el-form-item label="性别">
@@ -14,6 +20,15 @@
14 20
         <el-radio label="0">男</el-radio>
15 21
         <el-radio label="1">女</el-radio>
16 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 32
     </el-form-item>
18 33
     <el-form-item>
19 34
       <el-button type="primary" size="mini" @click="submit">保存</el-button>
@@ -39,13 +54,22 @@ export default {
39 54
         nickName: [
40 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 74
         phonenumber: [
51 75
           { required: true, message: "手机号码不能为空", trigger: "blur" },
@@ -62,7 +86,7 @@ export default {
62 86
     user: {
63 87
       handler(user) {
64 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 92
       immediate: true

読み込み中…
キャンセル
保存