ta-position="right center">  oa-app/src/main/resources/application.yml

+ 92 - 10
oa-app/src/main/java/com/css/oa/exam/admin/controller/CasLoginController.java

@ -1,10 +1,13 @@
1 1
package com.css.oa.exam.admin.controller;
2 2
3
import cn.com.dhcc.uums.entity.SSORole;
3 4
import cn.com.dhcc.uums.entity.SSOUser;
4 5
import cn.com.dhcc.uums.util.SSOTools;
5 6
import com.css.bpm.platform.org.dept.repository.entity.DeptEntity;
7
import com.css.bpm.platform.org.user.repository.entity.UserEntity;
6 8
import com.css.oa.utils.*;
7 9
import com.fasterxml.jackson.databind.ObjectMapper;
10
import com.google.gson.Gson;
8 11
import io.swagger.annotations.Api;
9 12
import io.swagger.annotations.ApiOperation;
10 13
import org.apache.commons.lang3.StringUtils;
@ -13,6 +16,7 @@ import org.slf4j.LoggerFactory;
13 16
import org.springframework.beans.BeanUtils;
14 17
import org.springframework.beans.factory.annotation.Autowired;
15 18
import org.springframework.data.domain.Page;
19
import org.springframework.data.redis.core.RedisTemplate;
16 20
import org.springframework.web.bind.annotation.GetMapping;
17 21
import org.springframework.web.bind.annotation.RequestMapping;
18 22
import org.springframework.web.bind.annotation.RequestParam;
@ -30,7 +34,7 @@ import java.util.List;
30 34
@RestController
31 35
@RequestMapping("/casLogin")
32 36
public class CasLoginController {
33
//
37
    //
34 38
//    @Autowired
35 39
//    DepartmentService departmentService;
36 40
//    @Autowired
@ -40,39 +44,117 @@ public class CasLoginController {
40 44
41 45
    Logger log = LoggerFactory.getLogger(CasLoginController.class);
42 46
47
    @Autowired
48
    RedisTemplate redisTemplate;
49
50
    @Autowired
51
    UserAPIService userAPIService;
43 52
44 53
    @ApiOperation(value = "登录")
45 54
    @RequestMapping("/login")
46 55
    public void login(HttpSession session, HttpServletResponse response, HttpServletRequest request) {
47 56
        try {
48
57
            /*{
58
                "id": "fc80fa44f4ab4c389cddb17837074a34",
59
                    "persCode": "140622198906200032",
60
                    "userName": "zangtie",
61
                    "persName": "臧铁",
62
                    "orgCode": "100000002",
63
                    "orgName": "其他",
64
                    "orgJurd": "",
65
                    "jurdAreaType": "",
66
                    "adminOrgCode": "",
67
                    "depCode": "8be30b2208ff4b899be59c51465d34fe",
68
                    "depName": "临时部门",
69
                    "userState": "1",
70
                    "caCertification": "",
71
                    "ordernum": "95656",
72
                    "creater": "",
73
                    "modifier": "",
74
                    "roleInfoList": [
75
                {
76
                    "id": "9b0e3d32582d48a5be2af92a89cadc56",
77
                        "roleCode": "kfz",
78
                        "roleName": "开发者",
79
                        "roleDesc": "",
80
                        "roleType": "1",
81
                        "orgId": "",
82
                        "orgCode": "",
83
                        "orgName": "",
84
                        "orgJurd": "",
85
                        "jurdAreaType": "",
86
                        "sysId": "",
87
                        "sysCode": "2222",
88
                        "status": "1",
89
                        "creater": "",
90
                        "modifier": "",
91
                        "ordernum": "",
92
                        "note": ""
93
                },
94
                {
95
                    "id": "6b303bd8624e4c308401dfa1d3f2ac99",
96
                        "roleCode": "cdglxt",
97
                        "roleName": "菜单管理系统",
98
                        "roleDesc": "管理业务系统管理员的菜单",
99
                        "roleType": "1",
100
                        "orgId": "",
101
                        "orgCode": "",
102
                        "orgName": "",
103
                        "orgJurd": "",
104
                        "jurdAreaType": "",
105
                        "sysId": "",
106
                        "sysCode": "1001",
107
                        "status": "1",
108
                        "creater": "",
109
                        "modifier": "",
110
                        "ordernum": "",
111
                        "note": "管理业务系统管理员的菜单"
112
                }
113
  ]
114
            }
115
*/
49 116
            SSOUser ssoUser = SSOTools.getSSOUser(request);
117
            redisTemplate.opsForValue().set("131452021-SSOUSER", ssoUser);
118
            redisTemplate.opsForValue().set("131452021-ROLEINFOLIST", ssoUser.getRoleInfoList());
119
            SSOUser ssoUser1 = (SSOUser) redisTemplate.opsForValue().get("131452021-SSOUSER");
120
            List<SSORole> roleList = (List<SSORole>) redisTemplate.opsForValue().get("131452021-ROLEINFOLIST");
121
122
123
124
            UserEntity user = userAPIService.getUser(ssoUser1.getId());
125
            System.out.println(user);
126
            System.out.println(roleList);
127
128
            String json = new Gson().toJson(ssoUser);
129
            System.out.println(json);
50 130
            session.setAttribute("UUID", ssoUser.getId());
51 131
            session.setAttribute("USER_NAME", ssoUser.getUserName());
52 132
            session.setAttribute("ORG_NAME", ssoUser.getOrgName());
53 133
            session.setAttribute("DEP_NAME", ssoUser.getDepName());
54 134
            session.setAttribute("ROLE_INFO", ssoUser.getRoleInfoList().get(0));
55 135
            String contextPath = request.getContextPath();
56
            response.sendRedirect("http://localhost:8081/#/title_declaration/announcement_management");
57
        } catch (Exception e){
136
            response.sendRedirect("http://10.1.76.181:8081/zhbg/static/core/oa/TitleExamination/index.html");
137
        } catch (Exception e) {
58 138
            log.error("登录失败!", e);
59
        };
139
        }
140
        ;
60 141
    }
61 142
62 143
    @ApiOperation(value = "登出")
63 144
    @RequestMapping("/logout")
64
    public void logout(HttpSession session, HttpServletResponse response, HttpServletRequest request){
145
    public void logout(HttpSession session, HttpServletResponse response, HttpServletRequest request) {
65 146
//        HttpSession session = request.getSession();
66 147
        try {
148
            System.out.print("登出---->" + session.toString());
67 149
            session.invalidate();
68 150
            // http://10.1.193.115:8100/cas/logout?service=http://10.1.176.129:8081/zhbg
69
            response.sendRedirect("http://10.1.193.115:8100/cas/logout?service=http://10.1.176.129:8081/zhbg");
70
        } catch (Exception e){
151
            response.sendRedirect("http://idportal_test.mwr.cn:8100/cas/logout?service=http://10.1.76.181:8081/zhbg");
152
        } catch (Exception e) {
71 153
            log.error("登出失败!", e);
72
        };
154
        }
155
        ;
73 156
74 157
    }
75 158
76 159
77
78 160
}

+ 5 - 4
oa-app/src/main/resources/application.yml

@ -2,12 +2,13 @@ server:
2 2
  port: 8081
3 3
  servlet:
4 4
    context-path: /zhbg
5
5 6
spring:
6 7
  cas:
7
    #夏博电脑的IP地址
8
    server-name: http://10.1.176.129:8081/zhbg
9
    #支撑平台服务地址
10
    cas-server-url-prefix: http://10.1.193.115:8100/cas
8
    #    server-name: http://10.1.176.129:8081/zhbg
9
    server-name: http://10.1.76.181:8081/zhbg
10
    #    cas-server-url-prefix: http://10.1.193.115:8100/cas
11
    cas-server-url-prefix: http://idportal_test.mwr.cn:8100/cas
11 12
    cas-server-login-url: ${spring.cas.cas-server-url-prefix}/login
12 13
    cas-server-logout-url: ${spring.cas.cas-server-url-prefix}/logout
13 14
    ignore-pattern: (register|\.js|\.img|\.css)(\?.*)?$

个人信息编辑新增条目、头像修改等(我的报名考试时间字段待添加) · 8a4b49b16e - Gogs: Go Git Service
Ver Código Fonte

个人信息编辑新增条目、头像修改等(我的报名考试时间字段待添加)

yy 3 anos atrás
pai
commit
8a4b49b16e

+ 2 - 2
public/config.js

@ -1,4 +1,4 @@
1 1
window.serverUrl = {
2
    url: 'http://192.168.168.46:8081/zhbg',
3
    routerPath: "http://10.1.76.181:8000/zhbg"
2
    url: 'http://192.168.8.49:8081/zhbg',
3
    routerPath: "http://192.168.8.49:8081/zhbg"
4 4
}

BIN
src/assets/img/avatar.jpg


BIN
src/assets/img/dog.jpeg


+ 6 - 0
src/views/PersonalCenter/MyRegistration.vue

@ -36,6 +36,9 @@
36 36
        </el-table-column>
37 37
        <el-table-column prop="subject_name" label="考试科目" width="150">
38 38
        </el-table-column>
39
        <el-table-column prop="time" label="考试日期" width="120">
40
        </el-table-column>
41
        <!-- TODO:修改字段名 -->
39 42
        <el-table-column prop="time" label="考试时间" width="120">
40 43
        </el-table-column>
41 44
        <el-table-column label="操作" show-overflow-tooltip>
@ -66,6 +69,9 @@
66 69
        </el-table-column>
67 70
        <el-table-column prop="subject_name" label="考试科目" width="120">
68 71
        </el-table-column>
72
        <el-table-column prop="time" label="考试日期" width="120">
73
        </el-table-column>
74
        <!-- TODO:修改字段名 -->
69 75
        <el-table-column prop="time" label="考试时间" width="120">
70 76
        </el-table-column>
71 77
        <el-table-column prop="exam_state" label="报考状态" width="100">

+ 14 - 4
src/views/PersonalCenter/PersonalData.vue

@ -2,7 +2,7 @@
2 2
  <div class="person_root">
3 3
    <!--只显示,不能编辑-->
4 4
    <div class="onlyShow" v-if="!edit">
5
      <img src="../../assets/img/dog.jpeg" class="avarta" />
5
      <img src="../../assets/img/avatar.jpg" class="avarta" />
6 6
      <div class="item">
7 7
        <h3 class="item-left">身份证号:</h3>
8 8
        <h3 class="item-right">{{ studentData.card_num }}</h3>
@ -13,7 +13,7 @@
13 13
      </div>
14 14
      <div class="item">
15 15
        <h3 class="item-left">所属单位:</h3>
16
        <h3 class="item-right">{{ studentData.unit_name }}</h3>
16
        <h3 class="item-right">{{ studentData.unit_tree }}</h3>
17 17
      </div>
18 18
      <div class="item">
19 19
        <h3 class="item-left">从事工作:</h3>
@ -63,7 +63,7 @@
63 63
            <span>考生姓名:{{ studentData.name }}</span>
64 64
          </div>
65 65
          <div class="avarta2">
66
            <img src="../../assets/img/dog.jpeg" />
66
            <img src="../../assets/img/avatar.jpg" />
67 67
            <a @click="updateImg">点击修改头像</a>
68 68
          </div>
69 69
        </div>
@ -99,6 +99,15 @@
99 99
              </el-option>
100 100
            </el-select>
101 101
          </el-form-item>
102
          <el-form-item class="myinput" label="从事工作:" prop="job">
103
            <el-input v-model="form.job"></el-input>
104
          </el-form-item>
105
          <el-form-item class="myinput" label="现职称:" prop="professional">
106
            <el-input v-model="form.professional"></el-input>
107
          </el-form-item>
108
          <el-form-item class="myinput" label="手机:" prop="phone">
109
            <el-input v-model="form.phone"></el-input>
110
          </el-form-item>
102 111
          <el-form-item class="myinput" label="电子信箱:" prop="email">
103 112
            <el-input v-model="form.email"></el-input>
104 113
          </el-form-item>
@ -273,6 +282,7 @@ export default {
273 282
.onlyShow {
274 283
  padding-top: 30px;
275 284
  line-height: 40px;
285
  margin-left: -80px;
276 286
  //text-align: left;
277 287
  width: 100%;
278 288
  display: flex;
@ -285,7 +295,7 @@ export default {
285 295
    height: 100px;
286 296
    position: absolute;
287 297
    top: 10%;
288
    left: 75%;
298
    left: 83%;
289 299
  }
290 300
  .item {
291 301
    display: flex;

+ 1 - 1
src/views/PersonalCenter/PrintAdmissionCard.vue

@ -78,7 +78,7 @@
78 78
              </span>
79 79
            </div>
80 80
            <div class="avatar">
81
              <img src="../../assets/img/dog.jpeg" />
81
              <img src="../../assets/img/avatar.jpg" />
82 82
            </div>
83 83
          </div>
84 84
          <span class="left-top-left-span">

+ 24 - 4
src/views/PersonalCenter/index.vue

@ -5,8 +5,8 @@
5 5
            <div class="center">
6 6
                <div class="left">
7 7
                    <div class="left-first">
8
                        <img src="../../assets/img/dog.jpeg">
9
                        <h3>欢迎: 朱局长</h3>
8
                        <img src="../../assets/img/avatar.jpg">
9
                        <h3>欢迎: {{ studentData.name }}</h3>
10 10
                    </div>
11 11
                    <div class="left-mid">
12 12
                        <el-button type="primary" class="left-mid-btn" @click="onChange(0)">个人资料</el-button>
@ -68,6 +68,9 @@ import ScoreInquiry from "@/views/PersonalCenter/ScoreInquiry";
68 68
import CertificateInquiry from "@/views/PersonalCenter/CertificateInquiry";
69 69
import ExamFlow from "@/views/PersonalCenter/ExamFlow";
70 70
import local from "@/utils/local";
71
import {
72
  getStudentInfo, //获取学生信息列表
73
} from "@/api/home";
71 74
export default {
72 75
    components: {
73 76
        PersonalData,
@ -85,6 +88,7 @@ export default {
85 88
            form: {
86 89
                id: "",
87 90
            },
91
            studentData: [],
88 92
        }
89 93
    },
90 94
    created() {
@ -92,9 +96,25 @@ export default {
92 96
        this.form.id = local.get("id");
93 97
        if(this.$route.query.selected_index) {
94 98
            this.selected_index = this.$route.query.selected_index;
95
        }
99
        };
100
        this.fetchData();
96 101
    },
97 102
    methods: {
103
        // 获取考生个人资料
104
        async fetchData() {
105
            let set_id = local.get("id");
106
            let res = await getStudentInfo({
107
                student_id: set_id,
108
            });
109
110
            // 解构数据
111
            let { code, data } = res;
112
113
            // 赋值渲染
114
            if (code === 200) {
115
                this.studentData = data.res.student;
116
            }
117
        },
98 118
        onChange(index) {
99 119
            this.selected_index = index;
100 120
        },
@ -191,7 +211,7 @@ export default {
191 211
    display: flex;
192 212
    flex-grow: 1;
193 213
    height: 100%;
194
    max-width: 980px;
214
    // max-width: 980px;
195 215
    //background-color: yellowgreen;
196 216
}
197 217
</style>

XinChuang/client_web - Gogs: Go Git Service

1 Ревизии (263ff116218cb95f88d07e2c187d947a1f52d4ff)

Автор SHA1 Съобщение Дата
  yy 422ea9d470 init преди 3 години