vue2-client 1.3.14 → 1.3.16

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 (95) hide show
  1. package/CHANGELOG.md +315 -311
  2. package/index.js +30 -30
  3. package/package.json +76 -76
  4. package/src/base-client/components/common/AddressSearchCombobox/AddressSearchCombobox.vue +225 -225
  5. package/src/base-client/components/common/CreateQuery/CreateQuery.vue +551 -551
  6. package/src/base-client/components/common/CreateQuery/CreateQueryItem.vue +777 -777
  7. package/src/base-client/components/common/CreateSimpleFormQuery/CreateSimpleFormQueryItem.vue +553 -553
  8. package/src/base-client/components/common/CustomColumnsDrawer/index.md +46 -46
  9. package/src/base-client/components/common/FormGroupQuery/FormGroupQuery.vue +165 -165
  10. package/src/base-client/components/common/JSONToTree/jsontotree.vue +275 -275
  11. package/src/base-client/components/common/Upload/Upload.vue +165 -161
  12. package/src/base-client/components/common/XAddForm/XAddForm.vue +354 -353
  13. package/src/base-client/components/common/XAddNativeForm/XAddNativeForm.vue +327 -326
  14. package/src/base-client/components/common/XCard/XCard.vue +64 -64
  15. package/src/base-client/components/common/XForm/XForm.vue +274 -273
  16. package/src/base-client/components/common/XForm/XFormItem.vue +389 -389
  17. package/src/base-client/components/common/XFormTable/index.md +96 -96
  18. package/src/base-client/components/common/XTable/XTable.vue +278 -278
  19. package/src/base-client/components/system/LogDetailsView/LogDetailsView.vue +376 -376
  20. package/src/base-client/components/system/QueryParamsDetailsView/QueryParamsDetailsView.vue +281 -281
  21. package/src/base-client/components/ticket/TicketDetailsView/TicketDetailsView.vue +807 -807
  22. package/src/base-client/components/ticket/TicketDetailsView/index.md +29 -29
  23. package/src/base-client/components/ticket/TicketDetailsView/part/TicketDetailsFlow.vue +260 -260
  24. package/src/base-client/components/ticket/TicketSubmitSuccessView/TicketSubmitSuccessView.vue +532 -532
  25. package/src/base-client/components/ticket/TicketSubmitSuccessView/index.md +29 -29
  26. package/src/base-client/plugins/AppData.js +69 -69
  27. package/src/base-client/plugins/GetLoginInfoService.js +179 -179
  28. package/src/base-client/plugins/PagedList.js +177 -177
  29. package/src/base-client/plugins/compatible/LoginServiceOA.js +20 -20
  30. package/src/base-client/plugins/i18n-extend.js +32 -32
  31. package/src/components/Ellipsis/index.md +38 -38
  32. package/src/components/NumberInfo/index.md +43 -43
  33. package/src/components/STable/README.md +341 -341
  34. package/src/components/STable/index.js +318 -318
  35. package/src/components/Trend/index.md +45 -45
  36. package/src/components/checkbox/ColorCheckbox.vue +157 -157
  37. package/src/components/checkbox/ImgCheckbox.vue +163 -163
  38. package/src/components/exception/ExceptionPage.vue +70 -70
  39. package/src/components/form/FormRow.vue +52 -52
  40. package/src/components/index.js +36 -36
  41. package/src/components/menu/SideMenu.vue +62 -62
  42. package/src/components/menu/menu.js +273 -273
  43. package/src/components/setting/Setting.vue +235 -235
  44. package/src/components/table/StandardTable.vue +141 -141
  45. package/src/components/table/advance/ActionColumns.vue +158 -158
  46. package/src/components/table/advance/SearchArea.vue +355 -355
  47. package/src/components/tool/AStepItem.vue +60 -60
  48. package/src/components/tool/AvatarList.vue +68 -68
  49. package/src/components/tool/Drawer.vue +142 -142
  50. package/src/components/tool/TagSelect.vue +83 -83
  51. package/src/components/transition/PageToggleTransition.vue +97 -97
  52. package/src/config/replacer/resolve.config.js +67 -67
  53. package/src/layouts/AdminLayout.vue +174 -174
  54. package/src/layouts/header/AdminHeader.vue +104 -104
  55. package/src/layouts/header/HeaderNotice.vue +167 -167
  56. package/src/layouts/header/HeaderSearch.vue +67 -67
  57. package/src/layouts/header/InstitutionDetail.vue +181 -181
  58. package/src/layouts/tabs/TabsHead.vue +190 -190
  59. package/src/layouts/tabs/TabsView.vue +379 -379
  60. package/src/mock/goods/index.js +108 -108
  61. package/src/pages/CreateQueryPage.vue +65 -65
  62. package/src/pages/login/Login.vue +277 -277
  63. package/src/pages/report/ReportTable.js +124 -124
  64. package/src/pages/report/ReportTableHome.vue +28 -28
  65. package/src/pages/resourceManage/orgListManage.vue +98 -98
  66. package/src/pages/system/dictionary/index.vue +43 -43
  67. package/src/pages/system/file/index.vue +317 -317
  68. package/src/pages/system/queryParams/index.vue +43 -43
  69. package/src/pages/system/ticket/index.vue +461 -461
  70. package/src/pages/system/ticket/submitTicketSuccess.vue +206 -206
  71. package/src/router/async/config.async.js +27 -27
  72. package/src/router/async/router.map.js +56 -56
  73. package/src/router/index.js +27 -27
  74. package/src/services/api/DictionaryDetailsViewApi.js +6 -6
  75. package/src/services/api/LogDetailsViewApi.js +10 -10
  76. package/src/services/api/QueryParamsDetailsViewApi.js +6 -6
  77. package/src/services/api/TicketDetailsViewApi.js +34 -34
  78. package/src/services/api/common.js +58 -58
  79. package/src/services/api/commonTempTable.js +10 -10
  80. package/src/services/api/index.js +17 -17
  81. package/src/services/api/manage.js +8 -8
  82. package/src/store/mutation-types.js +2 -2
  83. package/src/theme/default/nprogress.less +76 -76
  84. package/src/theme/default/style.less +47 -47
  85. package/src/utils/colors.js +103 -103
  86. package/src/utils/excel/Blob.js +180 -180
  87. package/src/utils/excel/Export2Excel.js +141 -141
  88. package/src/utils/formatter.js +68 -68
  89. package/src/utils/i18n.js +80 -80
  90. package/src/utils/request.js +225 -225
  91. package/src/utils/routerUtil.js +358 -358
  92. package/src/utils/theme-color-replacer-extend.js +91 -91
  93. package/src/utils/themeUtil.js +100 -100
  94. package/src/utils/util.js +230 -230
  95. package/vue.config.js +99 -99
@@ -1,376 +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
- 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>
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>