vue2-client 1.18.26 → 1.18.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/.eslintrc.js +90 -90
  2. package/Components.md +60 -60
  3. package/docs/index.md +30 -30
  4. package/index.js +31 -31
  5. package/jest-transform-stub.js +8 -8
  6. package/jest.setup.js +7 -7
  7. package/package.json +1 -1
  8. package/src/assets/img/querySlotDemo.svg +15 -15
  9. package/src/base-client/components/common/AmapMarker/AmapPointRendering.vue +120 -120
  10. package/src/base-client/components/common/CitySelect/index.js +3 -3
  11. package/src/base-client/components/common/CitySelect/index.md +109 -109
  12. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +669 -669
  13. package/src/base-client/components/common/CreateQuery/index.js +3 -3
  14. package/src/base-client/components/common/CreateQuery/index.md +42 -42
  15. package/src/base-client/components/common/CreateSimpleFormQuery/index.js +3 -3
  16. package/src/base-client/components/common/CreateSimpleFormQuery/index.md +42 -42
  17. package/src/base-client/components/common/FormGroupEdit/index.js +3 -3
  18. package/src/base-client/components/common/FormGroupEdit/index.md +43 -43
  19. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +166 -166
  20. package/src/base-client/components/common/FormGroupQuery/index.js +3 -3
  21. package/src/base-client/components/common/FormGroupQuery/index.md +43 -43
  22. package/src/base-client/components/common/JSONToTree/jsontotree.vue +271 -271
  23. package/src/base-client/components/common/PersonSetting/PersonSetting.vue +208 -208
  24. package/src/base-client/components/common/PersonSetting/index.js +3 -3
  25. package/src/base-client/components/common/Tree/Tree.vue +149 -149
  26. package/src/base-client/components/common/Tree/index.js +2 -2
  27. package/src/base-client/components/common/Upload/index.js +3 -3
  28. package/src/base-client/components/common/XAddNativeForm/index.md +146 -146
  29. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  30. package/src/base-client/components/common/XDataDrawer/XDataDrawer.vue +180 -180
  31. package/src/base-client/components/common/XDataDrawer/index.js +3 -3
  32. package/src/base-client/components/common/XDataDrawer/index.md +41 -41
  33. package/src/base-client/components/common/XDescriptions/index.js +3 -3
  34. package/src/base-client/components/common/XDescriptions/index.md +322 -322
  35. package/src/base-client/components/common/XForm/index.md +178 -178
  36. package/src/base-client/components/common/XFormTable/XFormTable.vue +91 -80
  37. package/src/base-client/components/common/XStepView/XStepView.vue +252 -252
  38. package/src/base-client/components/common/XStepView/index.js +3 -3
  39. package/src/base-client/components/common/XStepView/index.md +31 -31
  40. package/src/base-client/components/common/XTable/XTable.vue +71 -62
  41. package/src/base-client/components/common/XTable/index.md +255 -255
  42. package/src/base-client/components/his/HChart/HChart.vue +219 -3
  43. package/src/base-client/components/system/DictionaryDetailsView/DictionaryDetailsView.vue +232 -232
  44. package/src/base-client/plugins/Config.js +19 -19
  45. package/src/base-client/plugins/tabs-page-plugin.js +39 -39
  46. package/src/components/Charts/Bar.vue +62 -62
  47. package/src/components/Charts/ChartCard.vue +134 -134
  48. package/src/components/Charts/Liquid.vue +67 -67
  49. package/src/components/Charts/MiniArea.vue +39 -39
  50. package/src/components/Charts/MiniBar.vue +39 -39
  51. package/src/components/Charts/MiniProgress.vue +75 -75
  52. package/src/components/Charts/MiniSmoothArea.vue +40 -40
  53. package/src/components/Charts/Radar.vue +68 -68
  54. package/src/components/Charts/RankList.vue +77 -77
  55. package/src/components/Charts/TagCloud.vue +113 -113
  56. package/src/components/Charts/TransferBar.vue +64 -64
  57. package/src/components/Charts/Trend.vue +82 -82
  58. package/src/components/Charts/chart.less +12 -12
  59. package/src/components/Charts/smooth.area.less +13 -13
  60. package/src/components/NumberInfo/NumberInfo.vue +54 -54
  61. package/src/components/NumberInfo/index.js +3 -3
  62. package/src/components/NumberInfo/index.less +54 -54
  63. package/src/components/NumberInfo/index.md +43 -43
  64. package/src/components/card/ChartCard.vue +79 -79
  65. package/src/components/chart/Bar.vue +60 -60
  66. package/src/components/chart/MiniArea.vue +67 -67
  67. package/src/components/chart/MiniBar.vue +59 -59
  68. package/src/components/chart/MiniProgress.vue +57 -57
  69. package/src/components/chart/Radar.vue +80 -80
  70. package/src/components/chart/RankingList.vue +60 -60
  71. package/src/components/chart/Trend.vue +79 -79
  72. package/src/components/chart/index.less +9 -9
  73. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  74. package/src/components/input/IInput.vue +66 -66
  75. package/src/components/menu/SideMenu.vue +75 -75
  76. package/src/components/menu/menu.js +273 -273
  77. package/src/components/tool/AStepItem.vue +60 -60
  78. package/src/layouts/CommonLayout.vue +56 -56
  79. package/src/layouts/header/HeaderNotice.vue +177 -177
  80. package/src/lib.js +1 -1
  81. package/src/mock/extend/index.js +84 -84
  82. package/src/mock/goods/index.js +108 -108
  83. package/src/pages/dashboard/workplace/WorkPlace.vue +141 -141
  84. package/src/pages/system/dictionary/index.vue +44 -44
  85. package/src/pages/system/monitor/loginInfor/index.vue +37 -37
  86. package/src/pages/system/monitor/operLog/index.vue +37 -37
  87. package/src/pages/userInfoDetailManage/uploadFilesHistory/index.vue +159 -159
  88. package/src/services/api/cas.js +79 -79
  89. package/src/store/modules/setting.js +119 -119
  90. package/src/utils/authority-utils.js +85 -85
  91. package/src/utils/errorCode.js +6 -6
  92. package//350/277/201/347/247/273/346/227/245/345/277/227.md +15 -15
@@ -1,37 +1,37 @@
1
- <template>
2
- <a-card :bordered="false">
3
- <x-form-table
4
- title="操作日志"
5
- :queryParamsName="queryParamsName"
6
- serviceName="af-system"
7
- @action="toDetail">
8
- </x-form-table>
9
- </a-card>
10
- </template>
11
-
12
- <script>
13
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
14
-
15
- export default {
16
- name: 'OperLog',
17
- components: {
18
- XFormTable
19
- },
20
- data () {
21
- return {
22
- // 选中的编号
23
- selectNo: undefined,
24
- // 查询配置文件名
25
- queryParamsName: 'crud_oper_log_manage',
26
- // 是否显示详情抽屉
27
- detailVisible: false
28
- }
29
- },
30
- methods: {
31
- toDetail (record, id) {
32
- this.selectNo = id + ''
33
- this.detailVisible = true
34
- }
35
- }
36
- }
37
- </script>
1
+ <template>
2
+ <a-card :bordered="false">
3
+ <x-form-table
4
+ title="操作日志"
5
+ :queryParamsName="queryParamsName"
6
+ serviceName="af-system"
7
+ @action="toDetail">
8
+ </x-form-table>
9
+ </a-card>
10
+ </template>
11
+
12
+ <script>
13
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
14
+
15
+ export default {
16
+ name: 'OperLog',
17
+ components: {
18
+ XFormTable
19
+ },
20
+ data () {
21
+ return {
22
+ // 选中的编号
23
+ selectNo: undefined,
24
+ // 查询配置文件名
25
+ queryParamsName: 'crud_oper_log_manage',
26
+ // 是否显示详情抽屉
27
+ detailVisible: false
28
+ }
29
+ },
30
+ methods: {
31
+ toDetail (record, id) {
32
+ this.selectNo = id + ''
33
+ this.detailVisible = true
34
+ }
35
+ }
36
+ }
37
+ </script>
@@ -1,159 +1,159 @@
1
- <template>
2
- <div>
3
- <div class="filter-bar">
4
- <a-date-picker v-model="upload_date" placeholder="上传日期" @change="selfSearch" />
5
- <a-select
6
- style="width: 200px;"
7
- v-model="fusetype"
8
- :options="fusetypes"
9
- placeholder="分类"
10
- @change="selfSearch"
11
- allow-clear />
12
- <a-button type="primary" @click="selfSearch">查询</a-button>
13
- </div>
14
- <a-list bordered>
15
- <a-list-item v-for="item in files" :key="item.days">
16
- <div class="file-group">
17
- <h4>{{ item.days }}</h4>
18
- <div class="file-items">
19
- <div v-for="file in item.arrays" :key="file.id" class="file-card">
20
- <img :src="getFileUrl(file.f_downloadpath)" class="file-image" v-if="file.f_filetype.includes('jpg') || file.f_filetype.includes('png')" @click="openPreview(file.f_downloadpath)" style="cursor:pointer" />
21
- <p>上传时间: {{ file.f_uploaddate }}</p>
22
- <p>操作员: {{ file.f_username }}</p>
23
- <p>分类: {{ file.fusetype }}</p>
24
- <p>说明: {{ file.fremarks }}</p>
25
- <a :href="getFileUrl(file.f_downloadpath)" target="_blank">预览</a>
26
- <a-button v-if="isDelete === '1'" @click="delet(file.id)">删除</a-button>
27
- </div>
28
- </div>
29
- </div>
30
- </a-list-item>
31
- </a-list>
32
- <ImagePreview :src="previewImg" :visible="previewVisible" @close="previewVisible = false" />
33
- </div>
34
- </template>
35
-
36
- <script>
37
- import { post } from '@vue2-client/services/api'
38
- import { del } from '@vue2-client/services/api/restTools'
39
- import ImagePreview from './ImagePreview.vue'
40
- export default {
41
- props: {
42
- currUserInfo: {
43
- type: Object,
44
- default: () => undefined
45
- }
46
- },
47
- components: { ImagePreview },
48
- data () {
49
- return {
50
- upload_date: null,
51
- fusetype: null,
52
- files: [],
53
- fusetypes: [],
54
- isDelete: '0',
55
- previewVisible: false,
56
- previewImg: ''
57
- }
58
- },
59
- methods: {
60
- async getfusetypes () {
61
- this.fusetypes = [{ label: '全部', value: '' }]
62
- const res = await post('/api/af-revenue/logic/getFileUseType', {})
63
- this.fusetypes.push(...res.map(item => ({ label: item.fusetype, value: item.fusetype })))
64
- },
65
- async getFiles () {
66
- if (!this.currUserInfo) return
67
- this.files = []
68
- let condition = `f_blobid = '${this.currUserInfo.f_userinfo_id}'`
69
- if (this.upload_date) {
70
- condition += ` and CONVERT(VARCHAR(100), f_uploaddate, 23) = '${this.upload_date}'`
71
- }
72
- if (this.fusetype) {
73
- condition += ` and fusetype = '${this.fusetype}'`
74
- }
75
- const res = await post('/api/af-revenue/logic/getAllFiles', { data: { condition } })
76
- this.files = res.days.map(day => ({
77
- days: day.uploadday,
78
- arrays: res.array.filter(file => file.uploadday === day.uploadday)
79
- }))
80
- },
81
- async delet (fileId) {
82
- await del('api/af-revenue/entity/save/t_files', { id: fileId }, { resolveMsg: '删除成功', rejectMsg: '删除失败' })
83
- this.getFiles()
84
- },
85
- selfSearch () {
86
- this.getFiles()
87
- },
88
- openPreview (src) {
89
- this.previewImg = this.getFileUrl(src)
90
- this.previewVisible = true
91
- },
92
- getFileUrl (path) {
93
- if (!path) return ''
94
-
95
- console.log('原始路径:', path)
96
-
97
- // 获取当前域名和端口
98
- const baseUrl = `${window.location.protocol}//${window.location.host}`
99
-
100
- // 如果是本地文件路径,转换为新的转发路径
101
- if (path.match(/^[A-Za-z]:[\/\\]/)) {
102
- // 提取文件名
103
- const fileName = path.split(/[/\\]/).pop()
104
- const newUrl = `${baseUrl}/rs/image/file/${fileName}`
105
- console.log('转换后路径:', newUrl)
106
- return newUrl
107
- }
108
- // 如果已经是HTTP路径,直接返回
109
- if (path.startsWith('http')) {
110
- console.log('HTTP路径,直接返回:', path)
111
- return path
112
- }
113
- // 如果是相对路径,添加域名前缀
114
- if (path.startsWith('/resource/')) {
115
- const newUrl = `${baseUrl}${path}`
116
- console.log('相对路径转换:', newUrl)
117
- return newUrl
118
- }
119
- console.log('其他路径,直接返回:', path)
120
- return path
121
- }
122
- },
123
- mounted () {
124
- if (this.$login.r.includes('上传附件删除')) {
125
- this.isDelete = '1'
126
- }
127
- this.getFiles()
128
- this.getfusetypes()
129
- }
130
- }
131
- </script>
132
-
133
- <style scoped>
134
- .filter-bar {
135
- display: flex;
136
- gap: 10px;
137
- margin-bottom: 15px;
138
- }
139
- .file-group {
140
- margin-bottom: 15px;
141
- }
142
- .file-items {
143
- display: flex;
144
- flex-wrap: wrap;
145
- gap: 10px;
146
- }
147
- .file-card {
148
- border: 1px solid #ddd;
149
- padding: 10px;
150
- border-radius: 5px;
151
- width: 200px;
152
- }
153
- .file-image {
154
- width: 100%; /* 让图片填充整个容器 */
155
- height: 150px; /* 调整高度 */
156
- object-fit: cover; /* 保持图片比例,填充整个区域 */
157
- border-radius: 5px; /* 圆角边框 */
158
- }
159
- </style>
1
+ <template>
2
+ <div>
3
+ <div class="filter-bar">
4
+ <a-date-picker v-model="upload_date" placeholder="上传日期" @change="selfSearch" />
5
+ <a-select
6
+ style="width: 200px;"
7
+ v-model="fusetype"
8
+ :options="fusetypes"
9
+ placeholder="分类"
10
+ @change="selfSearch"
11
+ allow-clear />
12
+ <a-button type="primary" @click="selfSearch">查询</a-button>
13
+ </div>
14
+ <a-list bordered>
15
+ <a-list-item v-for="item in files" :key="item.days">
16
+ <div class="file-group">
17
+ <h4>{{ item.days }}</h4>
18
+ <div class="file-items">
19
+ <div v-for="file in item.arrays" :key="file.id" class="file-card">
20
+ <img :src="getFileUrl(file.f_downloadpath)" class="file-image" v-if="file.f_filetype.includes('jpg') || file.f_filetype.includes('png')" @click="openPreview(file.f_downloadpath)" style="cursor:pointer" />
21
+ <p>上传时间: {{ file.f_uploaddate }}</p>
22
+ <p>操作员: {{ file.f_username }}</p>
23
+ <p>分类: {{ file.fusetype }}</p>
24
+ <p>说明: {{ file.fremarks }}</p>
25
+ <a :href="getFileUrl(file.f_downloadpath)" target="_blank">预览</a>
26
+ <a-button v-if="isDelete === '1'" @click="delet(file.id)">删除</a-button>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </a-list-item>
31
+ </a-list>
32
+ <ImagePreview :src="previewImg" :visible="previewVisible" @close="previewVisible = false" />
33
+ </div>
34
+ </template>
35
+
36
+ <script>
37
+ import { post } from '@vue2-client/services/api'
38
+ import { del } from '@vue2-client/services/api/restTools'
39
+ import ImagePreview from './ImagePreview.vue'
40
+ export default {
41
+ props: {
42
+ currUserInfo: {
43
+ type: Object,
44
+ default: () => undefined
45
+ }
46
+ },
47
+ components: { ImagePreview },
48
+ data () {
49
+ return {
50
+ upload_date: null,
51
+ fusetype: null,
52
+ files: [],
53
+ fusetypes: [],
54
+ isDelete: '0',
55
+ previewVisible: false,
56
+ previewImg: ''
57
+ }
58
+ },
59
+ methods: {
60
+ async getfusetypes () {
61
+ this.fusetypes = [{ label: '全部', value: '' }]
62
+ const res = await post('/api/af-revenue/logic/getFileUseType', {})
63
+ this.fusetypes.push(...res.map(item => ({ label: item.fusetype, value: item.fusetype })))
64
+ },
65
+ async getFiles () {
66
+ if (!this.currUserInfo) return
67
+ this.files = []
68
+ let condition = `f_blobid = '${this.currUserInfo.f_userinfo_id}'`
69
+ if (this.upload_date) {
70
+ condition += ` and CONVERT(VARCHAR(100), f_uploaddate, 23) = '${this.upload_date}'`
71
+ }
72
+ if (this.fusetype) {
73
+ condition += ` and fusetype = '${this.fusetype}'`
74
+ }
75
+ const res = await post('/api/af-revenue/logic/getAllFiles', { data: { condition } })
76
+ this.files = res.days.map(day => ({
77
+ days: day.uploadday,
78
+ arrays: res.array.filter(file => file.uploadday === day.uploadday)
79
+ }))
80
+ },
81
+ async delet (fileId) {
82
+ await del('api/af-revenue/entity/save/t_files', { id: fileId }, { resolveMsg: '删除成功', rejectMsg: '删除失败' })
83
+ this.getFiles()
84
+ },
85
+ selfSearch () {
86
+ this.getFiles()
87
+ },
88
+ openPreview (src) {
89
+ this.previewImg = this.getFileUrl(src)
90
+ this.previewVisible = true
91
+ },
92
+ getFileUrl (path) {
93
+ if (!path) return ''
94
+
95
+ console.log('原始路径:', path)
96
+
97
+ // 获取当前域名和端口
98
+ const baseUrl = `${window.location.protocol}//${window.location.host}`
99
+
100
+ // 如果是本地文件路径,转换为新的转发路径
101
+ if (path.match(/^[A-Za-z]:[\/\\]/)) {
102
+ // 提取文件名
103
+ const fileName = path.split(/[/\\]/).pop()
104
+ const newUrl = `${baseUrl}/rs/image/file/${fileName}`
105
+ console.log('转换后路径:', newUrl)
106
+ return newUrl
107
+ }
108
+ // 如果已经是HTTP路径,直接返回
109
+ if (path.startsWith('http')) {
110
+ console.log('HTTP路径,直接返回:', path)
111
+ return path
112
+ }
113
+ // 如果是相对路径,添加域名前缀
114
+ if (path.startsWith('/resource/')) {
115
+ const newUrl = `${baseUrl}${path}`
116
+ console.log('相对路径转换:', newUrl)
117
+ return newUrl
118
+ }
119
+ console.log('其他路径,直接返回:', path)
120
+ return path
121
+ }
122
+ },
123
+ mounted () {
124
+ if (this.$login.r.includes('上传附件删除')) {
125
+ this.isDelete = '1'
126
+ }
127
+ this.getFiles()
128
+ this.getfusetypes()
129
+ }
130
+ }
131
+ </script>
132
+
133
+ <style scoped>
134
+ .filter-bar {
135
+ display: flex;
136
+ gap: 10px;
137
+ margin-bottom: 15px;
138
+ }
139
+ .file-group {
140
+ margin-bottom: 15px;
141
+ }
142
+ .file-items {
143
+ display: flex;
144
+ flex-wrap: wrap;
145
+ gap: 10px;
146
+ }
147
+ .file-card {
148
+ border: 1px solid #ddd;
149
+ padding: 10px;
150
+ border-radius: 5px;
151
+ width: 200px;
152
+ }
153
+ .file-image {
154
+ width: 100%; /* 让图片填充整个容器 */
155
+ height: 150px; /* 调整高度 */
156
+ object-fit: cover; /* 保持图片比例,填充整个区域 */
157
+ border-radius: 5px; /* 圆角边框 */
158
+ }
159
+ </style>
@@ -1,79 +1,79 @@
1
- import { post } from '@vue2-client/services/api/restTools'
2
- import notification from 'ant-design-vue/lib/notification'
3
- import { logout } from '@vue2-client/services/user'
4
- import Cookie from 'js-cookie'
5
-
6
- const casApi = {
7
- // 根据用户信息校验服务访问权限并生成ST
8
- createSTByUserInfo: '/api/af-sso/logic/createSTByUserInfo',
9
- // 根据TGC生成ST
10
- createSTByTGC: '/api/af-sso/logic/createSTByTGC',
11
- // 验证ST
12
- serviceValidate: '/api/af-sso/logic/openapi/serviceValidate',
13
- // 其他验证
14
- otherValidate: '/api/af-sso/logic'
15
- }
16
-
17
- function setTGTCookie (cookie) {
18
- return Cookie.set('TGT-Cookie', cookie)
19
- }
20
- function removeTGTCookie () {
21
- return Cookie.remove('TGT-Cookie')
22
- }
23
- export function getTGTCookie () {
24
- return Cookie.get('TGT-Cookie')
25
- }
26
-
27
- export function CASLoginByAuth (serviceKey) {
28
- return new Promise((resolve, reject) => {
29
- post(casApi.createSTByUserInfo, {
30
- serviceKey: serviceKey
31
- }).then(res => {
32
- setTGTCookie(res.tgc)
33
- resolve(res)
34
- }).catch(msg => {
35
- reject(msg)
36
- })
37
- })
38
- }
39
-
40
- export function CASLogin (serviceKey, inner) {
41
- // 从第三方跳转登录
42
- const tgc = getTGTCookie()
43
- if (tgc && !inner) {
44
- return new Promise((resolve, reject) => {
45
- post(casApi.createSTByTGC, {
46
- serviceKey: serviceKey,
47
- tgc: tgc
48
- }).then(res => {
49
- resolve(res)
50
- }).catch(msg => {
51
- if (msg === '当前操作没有权限') {
52
- removeTGTCookie()
53
- notification.error({
54
- message: '授权已过期,请重新登录',
55
- description: '2秒后自动跳转回登陆页面'
56
- })
57
- logout().then(() => {
58
- setTimeout(() => {
59
- window.location.href = '/login?serviceKey=' + serviceKey
60
- }, 1500)
61
- })
62
- } else {
63
- reject(msg)
64
- }
65
- })
66
- })
67
- } else {
68
- return CASLoginByAuth(serviceKey)
69
- }
70
- }
71
-
72
- export function doOtherValidate (logicName, st, serviceKey) {
73
- return post(casApi.otherValidate + '/' + logicName, {
74
- st: st,
75
- serviceKey: serviceKey
76
- }, null)
77
- }
78
-
79
- export default casApi
1
+ import { post } from '@vue2-client/services/api/restTools'
2
+ import notification from 'ant-design-vue/lib/notification'
3
+ import { logout } from '@vue2-client/services/user'
4
+ import Cookie from 'js-cookie'
5
+
6
+ const casApi = {
7
+ // 根据用户信息校验服务访问权限并生成ST
8
+ createSTByUserInfo: '/api/af-sso/logic/createSTByUserInfo',
9
+ // 根据TGC生成ST
10
+ createSTByTGC: '/api/af-sso/logic/createSTByTGC',
11
+ // 验证ST
12
+ serviceValidate: '/api/af-sso/logic/openapi/serviceValidate',
13
+ // 其他验证
14
+ otherValidate: '/api/af-sso/logic'
15
+ }
16
+
17
+ function setTGTCookie (cookie) {
18
+ return Cookie.set('TGT-Cookie', cookie)
19
+ }
20
+ function removeTGTCookie () {
21
+ return Cookie.remove('TGT-Cookie')
22
+ }
23
+ export function getTGTCookie () {
24
+ return Cookie.get('TGT-Cookie')
25
+ }
26
+
27
+ export function CASLoginByAuth (serviceKey) {
28
+ return new Promise((resolve, reject) => {
29
+ post(casApi.createSTByUserInfo, {
30
+ serviceKey: serviceKey
31
+ }).then(res => {
32
+ setTGTCookie(res.tgc)
33
+ resolve(res)
34
+ }).catch(msg => {
35
+ reject(msg)
36
+ })
37
+ })
38
+ }
39
+
40
+ export function CASLogin (serviceKey, inner) {
41
+ // 从第三方跳转登录
42
+ const tgc = getTGTCookie()
43
+ if (tgc && !inner) {
44
+ return new Promise((resolve, reject) => {
45
+ post(casApi.createSTByTGC, {
46
+ serviceKey: serviceKey,
47
+ tgc: tgc
48
+ }).then(res => {
49
+ resolve(res)
50
+ }).catch(msg => {
51
+ if (msg === '当前操作没有权限') {
52
+ removeTGTCookie()
53
+ notification.error({
54
+ message: '授权已过期,请重新登录',
55
+ description: '2秒后自动跳转回登陆页面'
56
+ })
57
+ logout().then(() => {
58
+ setTimeout(() => {
59
+ window.location.href = '/login?serviceKey=' + serviceKey
60
+ }, 1500)
61
+ })
62
+ } else {
63
+ reject(msg)
64
+ }
65
+ })
66
+ })
67
+ } else {
68
+ return CASLoginByAuth(serviceKey)
69
+ }
70
+ }
71
+
72
+ export function doOtherValidate (logicName, st, serviceKey) {
73
+ return post(casApi.otherValidate + '/' + logicName, {
74
+ st: st,
75
+ serviceKey: serviceKey
76
+ }, null)
77
+ }
78
+
79
+ export default casApi