vue2-client 1.3.6 → 1.3.9

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 (74) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/package.json +1 -1
  3. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +4 -4
  4. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +1 -1
  5. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +1 -1
  6. package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
  7. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  8. package/src/base-client/components/common/Upload/Upload.vue +3 -3
  9. package/src/base-client/components/common/XAddForm/XAddForm.vue +6 -2
  10. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +7 -2
  11. package/src/base-client/components/common/XForm/XForm.vue +1 -1
  12. package/src/base-client/components/common/XForm/XFormItem.vue +4 -2
  13. package/src/base-client/components/common/XFormTable/XFormTable.vue +1 -0
  14. package/src/base-client/components/system/LogDetailsView/LogDetailsView.vue +376 -372
  15. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +1 -1
  16. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +14 -13
  17. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  18. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  19. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +1 -1
  20. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  21. package/src/base-client/plugins/AppData.js +4 -6
  22. package/src/base-client/plugins/GetLoginInfoService.js +252 -252
  23. package/src/base-client/plugins/PagedList.js +3 -3
  24. package/src/base-client/plugins/i18n-extend.js +32 -32
  25. package/src/components/Ellipsis/index.md +38 -38
  26. package/src/components/NumberInfo/index.md +43 -43
  27. package/src/components/STable/README.md +341 -341
  28. package/src/components/Trend/index.md +45 -45
  29. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  30. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  31. package/src/components/exception/ExceptionPage.vue +70 -70
  32. package/src/components/form/FormRow.vue +52 -52
  33. package/src/components/menu/SideMenu.vue +62 -62
  34. package/src/components/menu/menu.js +273 -273
  35. package/src/components/setting/Setting.vue +235 -235
  36. package/src/components/table/advance/ActionColumns.vue +158 -158
  37. package/src/components/table/advance/SearchArea.vue +355 -355
  38. package/src/components/tool/AStepItem.vue +60 -60
  39. package/src/components/tool/AvatarList.vue +68 -69
  40. package/src/components/tool/Drawer.vue +142 -142
  41. package/src/components/transition/PageToggleTransition.vue +97 -97
  42. package/src/config/replacer/resolve.config.js +67 -67
  43. package/src/layouts/AdminLayout.vue +174 -174
  44. package/src/layouts/header/AdminHeader.vue +3 -3
  45. package/src/layouts/header/HeaderNotice.vue +1 -1
  46. package/src/layouts/header/HeaderSearch.vue +67 -67
  47. package/src/layouts/header/InstitutionDetail.vue +3 -3
  48. package/src/layouts/tabs/TabsHead.vue +190 -190
  49. package/src/layouts/tabs/TabsView.vue +379 -379
  50. package/src/mock/goods/index.js +108 -108
  51. package/src/pages/CreateQueryPage.vue +2 -2
  52. package/src/pages/report/ReportTable.js +124 -125
  53. package/src/pages/report/ReportTableHome.vue +28 -28
  54. package/src/pages/system/file/index.vue +3 -3
  55. package/src/pages/system/ticket/index.vue +4 -1
  56. package/src/services/api/DictionaryDetailsViewApi.js +1 -1
  57. package/src/services/api/LogDetailsViewApi.js +3 -3
  58. package/src/services/api/QueryParamsDetailsViewApi.js +1 -1
  59. package/src/services/api/TicketDetailsViewApi.js +15 -23
  60. package/src/services/api/common.js +11 -11
  61. package/src/services/api/commonTempTable.js +3 -3
  62. package/src/services/api/manage.js +2 -2
  63. package/src/theme/default/nprogress.less +76 -76
  64. package/src/utils/colors.js +103 -103
  65. package/src/utils/excel/Blob.js +53 -54
  66. package/src/utils/excel/Export2Excel.js +4 -4
  67. package/src/utils/formatter.js +68 -68
  68. package/src/utils/i18n.js +1 -1
  69. package/src/utils/routerUtil.js +3 -3
  70. package/src/utils/theme-color-replacer-extend.js +3 -3
  71. package/src/utils/themeUtil.js +100 -102
  72. package/src/utils/util.js +2 -2
  73. package/vue.config.js +5 -15
  74. package/vue2-client.iml +9 -0
@@ -1,372 +1,376 @@
1
- <template>
2
- <a-drawer
3
- title="日志详情"
4
- placement="right"
5
- :width="isMobile ? screenWidth : screenWidth * 0.85"
6
- :visible="visible"
7
- @close="onClose"
8
- >
9
- <a-spin :spinning="loadLogDetails">
10
- <a-page-header
11
- :title="details.f_log_type + ': '+details.f_error_title"
12
- >
13
- <div class="row">
14
- <div class="content">
15
- <a-descriptions size="small" :column="isMobile ? 1 : 2">
16
- <a-descriptions-item label="日志编号">{{ details.id }}</a-descriptions-item>
17
- <a-descriptions-item label="所属服务">{{ details.f_service }}</a-descriptions-item>
18
- <a-descriptions-item label="网络路径">{{ details.f_web_url }}</a-descriptions-item>
19
- <a-descriptions-item label="源路径">{{ details.f_src }}</a-descriptions-item>
20
- <a-descriptions-item label="简述">
21
- {{ details.f_error_title }}
22
- </a-descriptions-item>
23
- <a-descriptions-item label="发生次数">
24
- {{ details.f_times }}
25
- </a-descriptions-item>
26
- <a-descriptions-item label="首次发生时间">
27
- {{ format(details.f_first_update_time,'yyyy-MM-dd hh:mm:ss') }}
28
- </a-descriptions-item>
29
- <a-descriptions-item label="最后发生时间">
30
- {{ format(details.f_last_update_time,'yyyy-MM-dd hh:mm:ss') }}
31
- </a-descriptions-item>
32
- </a-descriptions>
33
- </div>
34
- <div class="extra">
35
- <a-row class="status-list">
36
- <a-col :xs="12" :sm="24">
37
- <div class="text">类型</div>
38
- <div class="heading">
39
- <x-badge badge-key="logTypeMap" :value="details.f_log_type" :is-external-text="true"/>
40
- </div>
41
- </a-col>
42
- </a-row>
43
- <p></p>
44
- <a-row class="status-list">
45
- <a-col :xs="12" :sm="24">
46
- <div class="text">状态</div>
47
- <div class="heading">
48
- <a-dropdown :trigger="['click']">
49
- <a class="ant-dropdown-link" @click="e => e.preventDefault()">
50
- <a-icon style="margin-right: 4px;" :type="details.f_status | statusIconFilter" :style="details.f_status | statusIconStyleFilter"/>
51
- <span style="color:rgba(0, 0, 0, 0.85);">{{ details.f_status }}</span>
52
- <a-icon type="edit" style="font-size: 14px;color:#999;cursor: pointer;"/>
53
- </a>
54
- <a-menu slot="overlay" style="margin-top: 10px;width: 200px;">
55
- <a-menu-item style="padding: 10px 15px;">
56
- <a @click="updateLogStatus('待办的')">
57
- <a-icon :type="'待办的' | statusIconFilter" :style="'待办的' | statusIconStyleFilter"/>
58
- 待办的
59
- </a>
60
- </a-menu-item>
61
- <a-menu-item style="padding: 10px 15px;">
62
- <a @click="updateLogStatus('进行中')">
63
- <a-icon :type="'进行中' | statusIconFilter" :style="'进行中' | statusIconStyleFilter"/>
64
- 进行中
65
- </a>
66
- </a-menu-item>
67
- <a-menu-item style="padding: 10px 15px;">
68
- <a @click="updateLogStatus('已完成')">
69
- <a-icon :type="'已完成' | statusIconFilter" :style="'已完成' | statusIconStyleFilter"/>
70
- 已完成
71
- </a>
72
- </a-menu-item>
73
- <a-menu-item style="padding: 10px 15px;">
74
- <a @click="updateLogStatus('已关闭')">
75
- <a-icon :type="'已关闭' | statusIconFilter" :style="'已关闭' | statusIconStyleFilter"/>
76
- 已关闭
77
- </a>
78
- </a-menu-item>
79
- </a-menu>
80
- </a-dropdown>
81
- </div>
82
- </a-col>
83
- </a-row>
84
- </div>
85
- </div>
86
-
87
- <!-- actions -->
88
- <template v-slot:extra>
89
- <a-button-group style="margin-right: 4px;">
90
- <a-button type="dashed" @click="initView" :loading="loadLogDetails">刷新</a-button>
91
- </a-button-group>
92
- </template>
93
-
94
- <!-- 操作 -->
95
- <a-card :bordered="false" title="处理情况">
96
- <a-timeline :reverse="true">
97
- <a-timeline-item color="#666">
98
- <a-icon slot="dot" type="plus-square" style="font-size: 16px;" />
99
- 异常检测模块 捕获到了异常事件
100
- <span style="padding-left: 5px;font-size: 12px;color:#8c92a4;">{{ format(details.f_first_update_time,'yyyy-MM-dd hh:mm:ss') }}</span>
101
- </a-timeline-item>
102
- <a-timeline-item color="red">
103
- <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;" />
104
- 异常检测模块 已确认最后发生时间
105
- <span style="padding-left: 5px;font-size: 12px;color:#8c92a4;">{{ format(details.f_last_update_time,'yyyy-MM-dd hh:mm:ss') }}</span>
106
- </a-timeline-item>
107
- <a-timeline-item :key="index" v-for="(item, index) in eventList">
108
- <a-icon slot="dot" :type="item.f_info | eventIconFilter" :style="item.f_info | eventIconStyleFilter"/>
109
- {{ item.f_china_name }} {{ item.f_info }}
110
- <span style="padding-left: 5px;font-size: 12px;color:#8c92a4;">{{ format(item.f_input_date,'yyyy-MM-dd hh:mm:ss') }}</span>
111
- </a-timeline-item>
112
- </a-timeline>
113
- </a-card>
114
- <a-card
115
- style="margin-top: 24px"
116
- :bordered="false"
117
- :tabList="operationTabList"
118
- :activeTabKey="operationActiveTabKey"
119
- @tabChange="(key) => {this.operationActiveTabKey = key}"
120
- >
121
- <div v-if="operationActiveTabKey === '1'">
122
- <a-descriptions layout="vertical" bordered>
123
- <a-descriptions-item label="日志内容"><p style="margin: 0;white-space: pre;" v-html="details.f_error_msg === '' ? '--' : toText(details.f_error_msg)"></p></a-descriptions-item>
124
- </a-descriptions>
125
- </div>
126
- <div v-else-if="operationActiveTabKey === '2'" class="no-data"><a-icon type="frown-o"/>暂无数据</div>
127
- </a-card>
128
- </a-page-header>
129
- </a-spin>
130
- </a-drawer>
131
- </template>
132
-
133
- <script>
134
- import { formatDate } from '@vue2-client/utils/util'
135
- import { LogDetailsViewApi, post } from '@vue2-client/services/api'
136
- import { mapState } from 'vuex'
137
-
138
- const statusIconMap = {
139
- '待办的': {
140
- icon: 'info-circle',
141
- style: 'color: #fe7300;'
142
- },
143
- '进行中': {
144
- icon: 'clock-circle',
145
- style: 'color: #2d81d7;'
146
- },
147
- '已完成': {
148
- icon: 'check-circle',
149
- style: 'color:#4baf50;'
150
- },
151
- '已关闭': {
152
- icon: 'issues-close',
153
- style: 'color:#ec0019;'
154
- }
155
- }
156
-
157
- const eventIconMap = {
158
- '开始处理事件': {
159
- icon: 'forward',
160
- style: 'color: #fe7300;'
161
- },
162
- '将事件状态修改为 代办的': {
163
- icon: 'edit',
164
- style: 'color: #2d81d7;'
165
- },
166
- '将事件状态修改为 已关闭': {
167
- icon: 'issues-close',
168
- style: 'color:#ec0019;'
169
- },
170
- '已完成对事件的处理': {
171
- icon: 'check-circle',
172
- style: 'color:#4baf50;'
173
- }
174
- }
175
-
176
- export default {
177
- name: 'LogDetailsView',
178
- data () {
179
- return {
180
- // 日志ID
181
- id: 0,
182
- // 日志详情加载,
183
- loadLogDetails: true,
184
- // 页面宽度
185
- screenWidth: document.documentElement.clientWidth,
186
- // 日志详情
187
- details: {
188
- id: 0,
189
- f_service: '',
190
- f_src: '',
191
- f_web_url: '',
192
- f_log_type: '',
193
- f_error_title: '',
194
- f_times: '',
195
- f_first_update_time: '',
196
- f_last_update_time: '',
197
- f_status: '待办的',
198
- f_error_msg: ''
199
- },
200
- // 处理情况数组
201
- eventList: [],
202
- // 处理情况描述
203
- remark: '',
204
- operationTabList: [
205
- {
206
- key: '1',
207
- tab: '基本信息'
208
- }
209
- ],
210
- operationActiveTabKey: '1'
211
- }
212
- },
213
- mounted () {
214
- this.initView()
215
- },
216
- filters: {
217
- statusIconFilter (type) {
218
- return statusIconMap[type].icon
219
- },
220
- statusIconStyleFilter (type) {
221
- return statusIconMap[type].style
222
- },
223
- eventIconFilter (type) {
224
- return eventIconMap[type].icon
225
- },
226
- eventIconStyleFilter (type) {
227
- return eventIconMap[type].style
228
- }
229
- },
230
- computed: {
231
- ...mapState('account', { currUser: 'user' }),
232
- ...mapState('setting', ['isMobile'])
233
- },
234
- props: {
235
- logid: {
236
- type: String || Number,
237
- required: true
238
- },
239
- visible: {
240
- type: Boolean,
241
- default: false
242
- }
243
- },
244
- methods: {
245
- // 初始化组件
246
- initView () {
247
- this.getLog(this.logid)
248
- },
249
- onClose () {
250
- this.$emit('update:visible', false)
251
- },
252
- // 获取日志详情信息
253
- getLog (logId) {
254
- this.loadLogDetails = true
255
- return post(LogDetailsViewApi.getLogDetails, {
256
- id: logId
257
- })
258
- .then(res => {
259
- this.details = res
260
- this.getRecord()
261
- this.loadLogDetails = false
262
- }, err => {
263
- this.loadLogDetails = false
264
- console.warn(err)
265
- })
266
- },
267
- getRecord () {
268
- return post(LogDetailsViewApi.getLogRecordList, {
269
- pageNo: 1,
270
- pageSize: 500,
271
- dataId: this.logid,
272
- type: '异常处理'
273
- })
274
- .then(res => {
275
- this.eventList = res.data.reverse()
276
- })
277
- },
278
- updateLogStatus (status) {
279
- if (this.loadLogDetails) {
280
- return
281
- }
282
- const _this = this
283
- return post(LogDetailsViewApi.updateLogStatusData, {
284
- id: _this.logid,
285
- status: status,
286
- username: _this.currUser.name
287
- }).then(res => {
288
- _this.getLog(_this.logid)
289
- if (res.nums === 1) {
290
- _this.$message.success('操作成功')
291
- } else {
292
- _this.$message.error('操作失败')
293
- }
294
- })
295
- },
296
- format (date, format) {
297
- return formatDate(date, format)
298
- },
299
- toText (text) {
300
- return text
301
- .replace(new RegExp('<-', 'g'), '<span style="color: red;font-weight: bold;"><-</span>')
302
- .replace(new RegExp('Caused by:', 'g'), '<span style="color: red;font-weight: bold;">Caused by:</span>')
303
- }
304
- },
305
- watch: {
306
- 'visible' (val) {
307
- if (val) {
308
- this.initView()
309
- }
310
- }
311
- }
312
- }
313
- </script>
314
-
315
- <style lang="less" scoped>
316
- .detail-layout {
317
- margin-left: 44px;
318
- }
319
- .text {
320
- color: rgba(0, 0, 0, .45);
321
- }
322
-
323
- .heading {
324
- color: rgba(0, 0, 0, .85);
325
- font-size: 20px;
326
- }
327
-
328
- .no-data {
329
- color: rgba(0, 0, 0, .25);
330
- text-align: center;
331
- line-height: 64px;
332
- font-size: 16px;
333
-
334
- i {
335
- font-size: 24px;
336
- margin-right: 16px;
337
- position: relative;
338
- top: 3px;
339
- }
340
- }
341
-
342
- .mobile {
343
- .detail-layout {
344
- margin-left: unset;
345
- }
346
- .text {
347
-
348
- }
349
- .status-list {
350
- text-align: left;
351
- }
352
- }
353
-
354
- .row {
355
- display: flex;
356
-
357
- .content {
358
- -webkit-box-flex: 1;
359
- flex: auto;
360
- -ms-flex: auto;
361
- }
362
-
363
- .extra {
364
- flex: 0 1 auto;
365
- -webkit-box-flex: 0;
366
- -ms-flex: 0 1 auto;
367
- min-width: 242px;
368
- margin-left: 88px;
369
- text-align: right;
370
- }
371
- }
372
- </style>
1
+ <template>
2
+ <a-drawer
3
+ title="日志详情"
4
+ placement="right"
5
+ :width="isMobile ? screenWidth : screenWidth * 0.85"
6
+ :visible="visible"
7
+ @close="onClose"
8
+ >
9
+ <a-spin :spinning="loadLogDetails">
10
+ <a-page-header
11
+ :title="details.f_log_type + ': '+details.f_error_title"
12
+ >
13
+ <div class="row">
14
+ <div class="content">
15
+ <a-descriptions size="small" :column="isMobile ? 1 : 2">
16
+ <a-descriptions-item label="日志编号">{{ details.id }}</a-descriptions-item>
17
+ <a-descriptions-item label="所属服务">{{ details.f_service }}</a-descriptions-item>
18
+ <a-descriptions-item label="网络路径">{{ details.f_web_url }}</a-descriptions-item>
19
+ <a-descriptions-item label="源路径">{{ details.f_src }}</a-descriptions-item>
20
+ <a-descriptions-item label="简述">
21
+ {{ details.f_error_title }}
22
+ </a-descriptions-item>
23
+ <a-descriptions-item label="发生次数">
24
+ {{ details.f_times }}
25
+ </a-descriptions-item>
26
+ <a-descriptions-item label="首次发生时间">
27
+ {{ format(details.f_first_update_time,'yyyy-MM-dd hh:mm:ss') }}
28
+ </a-descriptions-item>
29
+ <a-descriptions-item label="最后发生时间">
30
+ {{ format(details.f_last_update_time,'yyyy-MM-dd hh:mm:ss') }}
31
+ </a-descriptions-item>
32
+ </a-descriptions>
33
+ </div>
34
+ <div class="extra">
35
+ <a-row class="status-list">
36
+ <a-col :xs="12" :sm="24">
37
+ <div class="text">类型</div>
38
+ <div class="heading">
39
+ <x-badge badge-key="logTypeMap" :value="details.f_log_type" :is-external-text="true"/>
40
+ </div>
41
+ </a-col>
42
+ </a-row>
43
+ <p></p>
44
+ <a-row class="status-list">
45
+ <a-col :xs="12" :sm="24">
46
+ <div class="text">状态</div>
47
+ <div class="heading">
48
+ <a-dropdown :trigger="['click']">
49
+ <a class="ant-dropdown-link" @click="e => e.preventDefault()">
50
+ <a-icon style="margin-right: 4px;" :type="details.f_status | statusIconFilter" :style="details.f_status | statusIconStyleFilter"/>
51
+ <span style="color:rgba(0, 0, 0, 0.85);">{{ details.f_status }}</span>
52
+ <a-icon type="edit" style="font-size: 14px;color:#999;cursor: pointer;"/>
53
+ </a>
54
+ <a-menu slot="overlay" style="margin-top: 10px;width: 200px;">
55
+ <a-menu-item style="padding: 10px 15px;">
56
+ <a @click="updateLogStatus('待办的')">
57
+ <a-icon :type="'待办的' | statusIconFilter" :style="'待办的' | statusIconStyleFilter"/>
58
+ 待办的
59
+ </a>
60
+ </a-menu-item>
61
+ <a-menu-item style="padding: 10px 15px;">
62
+ <a @click="updateLogStatus('进行中')">
63
+ <a-icon :type="'进行中' | statusIconFilter" :style="'进行中' | statusIconStyleFilter"/>
64
+ 进行中
65
+ </a>
66
+ </a-menu-item>
67
+ <a-menu-item style="padding: 10px 15px;">
68
+ <a @click="updateLogStatus('已完成')">
69
+ <a-icon :type="'已完成' | statusIconFilter" :style="'已完成' | statusIconStyleFilter"/>
70
+ 已完成
71
+ </a>
72
+ </a-menu-item>
73
+ <a-menu-item style="padding: 10px 15px;">
74
+ <a @click="updateLogStatus('已关闭')">
75
+ <a-icon :type="'已关闭' | statusIconFilter" :style="'已关闭' | statusIconStyleFilter"/>
76
+ 已关闭
77
+ </a>
78
+ </a-menu-item>
79
+ </a-menu>
80
+ </a-dropdown>
81
+ </div>
82
+ </a-col>
83
+ </a-row>
84
+ </div>
85
+ </div>
86
+
87
+ <!-- actions -->
88
+ <template v-slot:extra>
89
+ <a-button-group style="margin-right: 4px;">
90
+ <a-button type="dashed" @click="initView" :loading="loadLogDetails">刷新</a-button>
91
+ </a-button-group>
92
+ </template>
93
+
94
+ <!-- 操作 -->
95
+ <a-card :bordered="false" title="处理情况">
96
+ <a-timeline :reverse="true">
97
+ <a-timeline-item color="#666">
98
+ <a-icon slot="dot" type="plus-square" style="font-size: 16px;" />
99
+ 异常检测模块 捕获到了异常事件
100
+ <span style="padding-left: 5px;font-size: 12px;color:#8c92a4;">{{ format(details.f_first_update_time,'yyyy-MM-dd hh:mm:ss') }}</span>
101
+ </a-timeline-item>
102
+ <a-timeline-item color="red">
103
+ <a-icon slot="dot" type="clock-circle-o" style="font-size: 16px;" />
104
+ 异常检测模块 已确认最后发生时间
105
+ <span style="padding-left: 5px;font-size: 12px;color:#8c92a4;">{{ format(details.f_last_update_time,'yyyy-MM-dd hh:mm:ss') }}</span>
106
+ </a-timeline-item>
107
+ <a-timeline-item :key="index" v-for="(item, index) in eventList">
108
+ <a-icon slot="dot" :type="item.f_info | eventIconFilter" :style="item.f_info | eventIconStyleFilter"/>
109
+ {{ item.f_china_name }} {{ item.f_info }}
110
+ <span style="padding-left: 5px;font-size: 12px;color:#8c92a4;">{{ format(item.f_input_date,'yyyy-MM-dd hh:mm:ss') }}</span>
111
+ </a-timeline-item>
112
+ </a-timeline>
113
+ </a-card>
114
+ <a-card
115
+ style="margin-top: 24px"
116
+ :bordered="false"
117
+ :tabList="operationTabList"
118
+ :activeTabKey="operationActiveTabKey"
119
+ @tabChange="(key) => {this.operationActiveTabKey = key}"
120
+ >
121
+ <div v-if="operationActiveTabKey === '1'">
122
+ <a-descriptions layout="vertical" bordered>
123
+ <a-descriptions-item label="日志内容"><p style="margin: 0;white-space: pre;" v-html="details.f_error_msg === '' ? '--' : toText(details.f_error_msg)"></p></a-descriptions-item>
124
+ </a-descriptions>
125
+ </div>
126
+ <div v-else-if="operationActiveTabKey === '2'" class="no-data"><a-icon type="frown-o"/>暂无数据</div>
127
+ </a-card>
128
+ </a-page-header>
129
+ </a-spin>
130
+ </a-drawer>
131
+ </template>
132
+
133
+ <script>
134
+ import { formatDate } from '@vue2-client/utils/util'
135
+ import { LogDetailsViewApi, post } from '@vue2-client/services/api'
136
+ import { mapState } from 'vuex'
137
+ import XBadge from '@/base-client/components/common/XBadge'
138
+
139
+ const statusIconMap = {
140
+ '待办的': {
141
+ icon: 'info-circle',
142
+ style: 'color: #fe7300;'
143
+ },
144
+ '进行中': {
145
+ icon: 'clock-circle',
146
+ style: 'color: #2d81d7;'
147
+ },
148
+ '已完成': {
149
+ icon: 'check-circle',
150
+ style: 'color:#4baf50;'
151
+ },
152
+ '已关闭': {
153
+ icon: 'issues-close',
154
+ style: 'color:#ec0019;'
155
+ }
156
+ }
157
+
158
+ const eventIconMap = {
159
+ '开始处理事件': {
160
+ icon: 'forward',
161
+ style: 'color: #fe7300;'
162
+ },
163
+ '将事件状态修改为 代办的': {
164
+ icon: 'edit',
165
+ style: 'color: #2d81d7;'
166
+ },
167
+ '将事件状态修改为 已关闭': {
168
+ icon: 'issues-close',
169
+ style: 'color:#ec0019;'
170
+ },
171
+ '已完成对事件的处理': {
172
+ icon: 'check-circle',
173
+ style: 'color:#4baf50;'
174
+ }
175
+ }
176
+
177
+ export default {
178
+ name: 'LogDetailsView',
179
+ components: {
180
+ XBadge
181
+ },
182
+ data () {
183
+ return {
184
+ // 日志ID
185
+ id: 0,
186
+ // 日志详情加载,
187
+ loadLogDetails: true,
188
+ // 页面宽度
189
+ screenWidth: document.documentElement.clientWidth,
190
+ // 日志详情
191
+ details: {
192
+ id: 0,
193
+ f_service: '',
194
+ f_src: '',
195
+ f_web_url: '',
196
+ f_log_type: '',
197
+ f_error_title: '',
198
+ f_times: '',
199
+ f_first_update_time: '',
200
+ f_last_update_time: '',
201
+ f_status: '待办的',
202
+ f_error_msg: ''
203
+ },
204
+ // 处理情况数组
205
+ eventList: [],
206
+ // 处理情况描述
207
+ remark: '',
208
+ operationTabList: [
209
+ {
210
+ key: '1',
211
+ tab: '基本信息'
212
+ }
213
+ ],
214
+ operationActiveTabKey: '1'
215
+ }
216
+ },
217
+ mounted () {
218
+ this.initView()
219
+ },
220
+ filters: {
221
+ statusIconFilter (type) {
222
+ return statusIconMap[type].icon
223
+ },
224
+ statusIconStyleFilter (type) {
225
+ return statusIconMap[type].style
226
+ },
227
+ eventIconFilter (type) {
228
+ return eventIconMap[type].icon
229
+ },
230
+ eventIconStyleFilter (type) {
231
+ return eventIconMap[type].style
232
+ }
233
+ },
234
+ computed: {
235
+ ...mapState('account', { currUser: 'user' }),
236
+ ...mapState('setting', ['isMobile'])
237
+ },
238
+ props: {
239
+ logid: {
240
+ type: String || Number,
241
+ required: true
242
+ },
243
+ visible: {
244
+ type: Boolean,
245
+ default: false
246
+ }
247
+ },
248
+ methods: {
249
+ // 初始化组件
250
+ initView () {
251
+ this.getLog(this.logid)
252
+ },
253
+ onClose () {
254
+ this.$emit('update:visible', false)
255
+ },
256
+ // 获取日志详情信息
257
+ getLog (logId) {
258
+ this.loadLogDetails = true
259
+ return post(LogDetailsViewApi.getLogDetails, {
260
+ id: logId
261
+ })
262
+ .then(res => {
263
+ this.details = res
264
+ this.getRecord()
265
+ this.loadLogDetails = false
266
+ }, err => {
267
+ this.loadLogDetails = false
268
+ console.warn(err)
269
+ })
270
+ },
271
+ getRecord () {
272
+ return post(LogDetailsViewApi.getLogRecordList, {
273
+ pageNo: 1,
274
+ pageSize: 500,
275
+ dataId: this.logid,
276
+ type: '异常处理'
277
+ })
278
+ .then(res => {
279
+ this.eventList = res.data.reverse()
280
+ })
281
+ },
282
+ updateLogStatus (status) {
283
+ if (this.loadLogDetails) {
284
+ return
285
+ }
286
+ const _this = this
287
+ return post(LogDetailsViewApi.updateLogStatusData, {
288
+ id: _this.logid,
289
+ status: status,
290
+ username: _this.currUser.name
291
+ }).then(res => {
292
+ _this.getLog(_this.logid)
293
+ if (res.nums === 1) {
294
+ _this.$message.success('操作成功')
295
+ } else {
296
+ _this.$message.error('操作失败')
297
+ }
298
+ })
299
+ },
300
+ format (date, format) {
301
+ return formatDate(date, format)
302
+ },
303
+ toText (text) {
304
+ return text
305
+ .replace(new RegExp('<-', 'g'), '<span style="color: red;font-weight: bold;"><-</span>')
306
+ .replace(new RegExp('Caused by:', 'g'), '<span style="color: red;font-weight: bold;">Caused by:</span>')
307
+ }
308
+ },
309
+ watch: {
310
+ 'visible' (val) {
311
+ if (val) {
312
+ this.initView()
313
+ }
314
+ }
315
+ }
316
+ }
317
+ </script>
318
+
319
+ <style lang="less" scoped>
320
+ .detail-layout {
321
+ margin-left: 44px;
322
+ }
323
+ .text {
324
+ color: rgba(0, 0, 0, .45);
325
+ }
326
+
327
+ .heading {
328
+ color: rgba(0, 0, 0, .85);
329
+ font-size: 20px;
330
+ }
331
+
332
+ .no-data {
333
+ color: rgba(0, 0, 0, .25);
334
+ text-align: center;
335
+ line-height: 64px;
336
+ font-size: 16px;
337
+
338
+ i {
339
+ font-size: 24px;
340
+ margin-right: 16px;
341
+ position: relative;
342
+ top: 3px;
343
+ }
344
+ }
345
+
346
+ .mobile {
347
+ .detail-layout {
348
+ margin-left: unset;
349
+ }
350
+ .text {
351
+
352
+ }
353
+ .status-list {
354
+ text-align: left;
355
+ }
356
+ }
357
+
358
+ .row {
359
+ display: flex;
360
+
361
+ .content {
362
+ -webkit-box-flex: 1;
363
+ flex: auto;
364
+ -ms-flex: auto;
365
+ }
366
+
367
+ .extra {
368
+ flex: 0 1 auto;
369
+ -webkit-box-flex: 0;
370
+ -ms-flex: 0 1 auto;
371
+ min-width: 242px;
372
+ margin-left: 88px;
373
+ text-align: right;
374
+ }
375
+ }
376
+ </style>