Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev
Showing
4 changed files
with
30 additions
and
18 deletions
... | @@ -9,17 +9,10 @@ | ... | @@ -9,17 +9,10 @@ |
9 | </div> | 9 | </div> |
10 | <div class="right-menu"> | 10 | <div class="right-menu"> |
11 | <svg-icon class="function" icon-class='function' /> | 11 | <svg-icon class="function" icon-class='function' /> |
12 | <!-- <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover" @command="handleCommand"> | ||
13 | <el-dropdown-menu slot="dropdown"> | ||
14 | <el-dropdown-item command="a">个人中心</el-dropdown-item> | ||
15 | </el-dropdown-menu> | ||
16 | </el-dropdown> --> | ||
17 | <div class="avatar-wrapper"> | 12 | <div class="avatar-wrapper"> |
18 | <span style="padding-right:10px">{{ name }}</span> | 13 | <span style="padding-right:10px">{{ name }}</span> |
19 | <img :src="avatar + '?imageView2/1/w/80/h/80'" class="user-avatar" /> | 14 | <img :src="avatar + '?imageView2/1/w/80/h/80'" class="user-avatar" /> |
20 | <!-- <i class="el-icon-caret-bottom" /> --> | ||
21 | </div> | 15 | </div> |
22 | |||
23 | <svg-icon class="shutdown" @click.native="logout" icon-class='shutdown' /> | 16 | <svg-icon class="shutdown" @click.native="logout" icon-class='shutdown' /> |
24 | </div> | 17 | </div> |
25 | </div> | 18 | </div> |
... | @@ -31,7 +24,7 @@ | ... | @@ -31,7 +24,7 @@ |
31 | import Cookies from 'js-cookie' | 24 | import Cookies from 'js-cookie' |
32 | import { mapGetters } from 'vuex' | 25 | import { mapGetters } from 'vuex' |
33 | import NoticeBar from '@/components/NoticeBar/index' | 26 | import NoticeBar from '@/components/NoticeBar/index' |
34 | import {getHomeNoticeList} from "@/api/home" | 27 | import { getHomeNoticeList } from "@/api/home" |
35 | export default { | 28 | export default { |
36 | components: { | 29 | components: { |
37 | NoticeBar | 30 | NoticeBar |
... | @@ -75,7 +68,7 @@ | ... | @@ -75,7 +68,7 @@ |
75 | if (process.env.NODE_ENV === 'development') { | 68 | if (process.env.NODE_ENV === 'development') { |
76 | localStorage.removeItem('token') | 69 | localStorage.removeItem('token') |
77 | } else { | 70 | } else { |
78 | Cookies.remove('ACCESS_TOKEN') | 71 | Cookies.remove('accessToken') |
79 | } | 72 | } |
80 | if (window._config.casEnable) { | 73 | if (window._config.casEnable) { |
81 | window.location.href = window._config.casBaseURL + '/logout?service=' + encodeURIComponent(window.location.href); | 74 | window.location.href = window._config.casBaseURL + '/logout?service=' + encodeURIComponent(window.location.href); | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: 项目权限 | 2 | * @Description: 项目权限 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-06-12 17:22:02 | 4 | * @LastEditTime: 2023-06-13 10:49:43 |
5 | */ | 5 | */ |
6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
7 | import axios from 'axios' | 7 | import axios from 'axios' |
... | @@ -23,7 +23,7 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -23,7 +23,7 @@ router.beforeEach(async (to, from, next) => { |
23 | let hasAddDict = store.state.dict.addDict | 23 | let hasAddDict = store.state.dict.addDict |
24 | let hasAddRoute = store.state.permission.addRoutes | 24 | let hasAddRoute = store.state.permission.addRoutes |
25 | // cas操作 | 25 | // cas操作 |
26 | const token = localStorage.getItem("token") || Cookies.get('token'); | 26 | const token = localStorage.getItem("token") || Cookies.get('accessToken'); |
27 | if (to.path === '/login') { | 27 | if (to.path === '/login') { |
28 | if (token) { | 28 | if (token) { |
29 | next('/') | 29 | next('/') |
... | @@ -46,7 +46,7 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -46,7 +46,7 @@ router.beforeEach(async (to, from, next) => { |
46 | if (process.env.NODE_ENV === 'development') { | 46 | if (process.env.NODE_ENV === 'development') { |
47 | localStorage.setItem('token', res.data.content.accessToken) | 47 | localStorage.setItem('token', res.data.content.accessToken) |
48 | } else { | 48 | } else { |
49 | Cookies.set('token', res.data.content.accessToken) | 49 | Cookies.set('accessToken', res.data.content.accessToken) |
50 | } | 50 | } |
51 | window.location.href = localStorage.getItem('location') | 51 | window.location.href = localStorage.getItem('location') |
52 | 52 | ... | ... |
... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
2 | /* | 2 | /* |
3 | * @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器 | 3 | * @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器 |
4 | * @Autor: renchao | 4 | * @Autor: renchao |
5 | * @LastEditTime: 2023-06-12 17:22:35 | 5 | * @LastEditTime: 2023-06-13 10:47:45 |
6 | */ | 6 | */ |
7 | import axios from 'axios' | 7 | import axios from 'axios' |
8 | import Router from '@/router' | 8 | import Router from '@/router' |
... | @@ -34,6 +34,14 @@ service.interceptors.request.use( | ... | @@ -34,6 +34,14 @@ service.interceptors.request.use( |
34 | } else { | 34 | } else { |
35 | config.headers.delete('Authorization') | 35 | config.headers.delete('Authorization') |
36 | } | 36 | } |
37 | } else { | ||
38 | const token = Cookies.get('accessToken') | ||
39 | // 添加请求头 | ||
40 | if (token) { | ||
41 | config.headers['Authorization'] = 'Bearer ' + token | ||
42 | } else { | ||
43 | config.headers.delete('Authorization') | ||
44 | } | ||
37 | } | 45 | } |
38 | return config | 46 | return config |
39 | }, | 47 | }, |
... | @@ -70,7 +78,7 @@ service.interceptors.response.use( | ... | @@ -70,7 +78,7 @@ service.interceptors.response.use( |
70 | if (process.env.NODE_ENV === 'development') { | 78 | if (process.env.NODE_ENV === 'development') { |
71 | localStorage.removeItem('token') | 79 | localStorage.removeItem('token') |
72 | } else { | 80 | } else { |
73 | Cookies.remove('token') | 81 | Cookies.remove('accessToken') |
74 | } | 82 | } |
75 | if (window._config.casEnable) { | 83 | if (window._config.casEnable) { |
76 | window.location.href = window._config.casBaseURL + '/logout?service=' + encodeURIComponent(locationUrl); | 84 | window.location.href = window._config.casBaseURL + '/logout?service=' + encodeURIComponent(locationUrl); | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:41:20 | 4 | * @LastEditTime: 2023-06-13 13:12:25 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div> | 7 | <div> |
... | @@ -12,8 +12,9 @@ | ... | @@ -12,8 +12,9 @@ |
12 | </div> | 12 | </div> |
13 | </template> | 13 | </template> |
14 | <script> | 14 | <script> |
15 | import addQlr from './dialog/addQlr.vue' | 15 | import axios from 'axios' |
16 | import { mapGetters } from 'vuex' | 16 | import { mapGetters } from 'vuex' |
17 | import addQlr from './dialog/addQlr.vue' | ||
17 | export default { | 18 | export default { |
18 | components: { | 19 | components: { |
19 | addQlr | 20 | addQlr |
... | @@ -66,7 +67,7 @@ | ... | @@ -66,7 +67,7 @@ |
66 | label: '身份证读卡器', | 67 | label: '身份证读卡器', |
67 | align: 'center', | 68 | align: 'center', |
68 | render: (h, scope) => { | 69 | render: (h, scope) => { |
69 | return <el-button type="text" icon="el-icon-tickets" onClick={() => { this.readClick(scope) }}>读取</el-button> | 70 | return <el-button type="text" icon="el-icon-tickets" onClick={() => { this.readClick(scope.row) }}>读取</el-button> |
70 | } | 71 | } |
71 | }, | 72 | }, |
72 | { | 73 | { |
... | @@ -193,8 +194,18 @@ | ... | @@ -193,8 +194,18 @@ |
193 | }, | 194 | }, |
194 | 195 | ||
195 | // 身份证读取 | 196 | // 身份证读取 |
196 | readClick () { }, | 197 | readClick (row) { |
198 | console.log(row, 'row'); | ||
199 | var httpurl = "http://127.0.0.1:33088/"; | ||
200 | var url = httpurl + "function=get_idcard&readnew=0" | ||
197 | 201 | ||
202 | axios.post(url).then(res => { | ||
203 | let data = res.data.IDCardInfo | ||
204 | row.sqrmc = data.name | ||
205 | row.zjzl = 1 | ||
206 | row.zjh = data.cardID | ||
207 | }) | ||
208 | }, | ||
198 | // 修改 | 209 | // 修改 |
199 | editClick (index, row) { | 210 | editClick (index, row) { |
200 | // popupDialog("申请人信息", "workflow/components/addQlr", { | 211 | // popupDialog("申请人信息", "workflow/components/addQlr", { | ... | ... |
-
Please register or sign in to post a comment