cloud-web-corejs 1.0.75 → 1.0.77

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 (90) hide show
  1. package/package.json +1 -1
  2. package/src/components/VabUpload/view.vue +2 -2
  3. package/src/components/advancedSearchDialog/mixins.js +1 -1
  4. package/src/components/fileLibrary/filterDialog.vue +383 -0
  5. package/src/components/fileLibrary/index.vue +22 -23
  6. package/src/components/fileLibrary/mixins/categoryMoveDialogMixins.js +1 -1
  7. package/src/components/fileLibrary/mixins/fileCategoryDialogMixins.js +1 -1
  8. package/src/components/fileLibrary/mixins/fileHistoryDialogMixins.js +2 -2
  9. package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +7 -7
  10. package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +4 -4
  11. package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +4 -4
  12. package/src/components/fileLibrary/mixins/indexMixins.js +45 -9
  13. package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +61 -2
  14. package/src/components/fileLibrary/mixins/recycleBinDialogMixins.js +1 -1
  15. package/src/components/fileLibrary/propertiesDialog.vue +18 -0
  16. package/src/components/fileLibrary/shareDialog.vue +1 -1
  17. package/src/components/table/index.js +12 -11
  18. package/src/components/table/tableForm.vue +99 -63
  19. package/src/components/table/tableFormMixin.js +1 -1
  20. package/src/components/wf/wf.js +1 -1
  21. package/src/components/wf/wfStartDialog.vue +1 -1
  22. package/src/components/wf/wfUtil.js +1 -1
  23. package/src/components/xform/form-designer/designer.js +1 -1
  24. package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +1 -1
  25. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +10 -5
  26. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +16 -16
  27. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +54 -14
  28. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +9 -4
  29. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +8 -2
  30. package/src/components/xform/form-designer/form-widget/field-widget/time-range-widget.vue +2 -2
  31. package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +1 -0
  32. package/src/components/xform/form-designer/indexMixin.js +1 -1
  33. package/src/components/xform/form-designer/setting-panel/form-setting.vue +12 -2
  34. package/src/components/xform/form-designer/setting-panel/property-editor/commonAttributeEnabled-editor.vue +41 -0
  35. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +1051 -1051
  36. package/src/components/xform/form-designer/setting-panel/property-editor/formScriptEnabled-editor.vue +42 -4
  37. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +107 -6
  38. package/src/components/xform/form-designer/setting-panel/property-editor/required-editor.vue +22 -18
  39. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
  40. package/src/components/xform/form-designer/toolbar-panel/index.vue +4 -3
  41. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +38 -6
  42. package/src/components/xform/form-render/container-item/data-table-item.vue +18 -19
  43. package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -1
  44. package/src/components/xform/form-render/indexMixin.js +2 -1
  45. package/src/components/xform/lang/zh-CN.js +1 -1
  46. package/src/components/xform/mixins/defaultHandle.js +1 -1
  47. package/src/components/xform/mixins/scriptHttp.js +1 -1
  48. package/src/components/xform/utils/util.js +1 -1
  49. package/src/layout/components/Sidebar/default.vue +1266 -1233
  50. package/src/layout/components/extractedCode/createDialog.vue +92 -0
  51. package/src/layout/components/extractedCode/queryDialog.vue +96 -0
  52. package/src/layout/components/extractedCode/viewDialog.vue +192 -0
  53. package/src/store/config/index.js +1 -1
  54. package/src/utils/index.js +4 -2
  55. package/src/utils/pddLog.js +103 -0
  56. package/src/utils/vab.js +19 -27
  57. package/src/views/bd/setting/bd_attach_setting/edit.vue +1 -1
  58. package/src/views/bd/setting/bd_attach_setting/mixins/edit.js +1 -1
  59. package/src/views/bd/setting/form_import_log/edit.vue +127 -0
  60. package/src/views/bd/setting/form_import_log/list.vue +205 -0
  61. package/src/views/bd/setting/form_script/edit1.vue +1 -1
  62. package/src/views/bd/setting/form_script/mixins/edit.js +3 -1
  63. package/src/views/bd/setting/form_script/mixins/edit1.js +1 -1
  64. package/src/views/bd/setting/form_script/mixins/list.js +1 -1
  65. package/src/views/bd/setting/form_script/mixins/list1.js +14 -14
  66. package/src/views/bd/setting/form_template/edit.vue +9 -1
  67. package/src/views/bd/setting/form_template/mixins/edit.js +1 -1
  68. package/src/views/bd/setting/form_template/mixins/list.js +25 -22
  69. package/src/views/bd/setting/menu_kind/authDialog.vue +1 -1
  70. package/src/views/bd/setting/menu_kind/mixins/authDialog.js +7 -7
  71. package/src/views/bd/setting/menu_kind/mixins/list.js +1 -1
  72. package/src/views/bd/setting/table_model/edit.vue +70 -12
  73. package/src/views/bd/setting/table_model/mixins/edit copy.js +903 -0
  74. package/src/views/bd/setting/table_model/mixins/edit.js +12 -13
  75. package/src/views/bd/setting/table_model/mixins/list.js +1 -1
  76. package/src/views/user/access_log/list.vue +349 -349
  77. package/src/views/user/company_info/dialog.vue +164 -164
  78. package/src/views/user/form/vform/designer.vue +5 -1
  79. package/src/views/user/home/default.vue +15 -11
  80. package/src/views/user/login/index2.vue +131 -0
  81. package/src/views/user/notify_message/dialog.vue +1 -1
  82. package/src/views/user/notify_template/edit.vue +188 -187
  83. package/src/views/user/notify_template/edit2.vue +176 -0
  84. package/src/views/user/notify_template/list.vue +4 -1
  85. package/src/views/user/notify_template/list2.vue +190 -0
  86. package/src/views/user/position/list.vue +2 -2
  87. package/src/views/user/role/dialog.vue +1 -1
  88. package/src/views/user/role/list.vue +2 -2
  89. package/src/views/user/sale_org/dialog.vue +1 -1
  90. package/src/views/user/user/dialog.vue +1 -1
@@ -1,349 +1,349 @@
1
- <template>
2
- <div id="containt">
3
- <el-tabs v-model="activeName" class="tab-box">
4
- <el-tab-pane :label="$t1('常规')" name="first">
5
- <editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :parent-target="_self"
6
- @reload="$reloadHandle"></editView>
7
- </el-tab-pane>
8
- <el-tab-pane :label="$t1('列表')" name="second">
9
- <div class="tree-box fl">
10
- <div class="tit"><b>{{ $t1('操作类型') }}</b></div>
11
- <el-tree
12
- :props="defaultProps"
13
- :load="loadNode"
14
- node-key="id"
15
- ref="tree"
16
- highlight-current
17
- lazy
18
- :expand-on-click-node="false"
19
- @node-click="handleNodeClick"
20
- class="tree-list"
21
- icon-class="el-icon-arrow-down"
22
- ></el-tree>
23
- </div>
24
- <label id="labBtn">
25
- <div class="icon">
26
- <i class="el-icon-more"></i>
27
- <i class="el-icon-more"></i>
28
- </div>
29
- </label>
30
- <div class="main-right fr" style="padding-left:6px;">
31
- <div class="grid-height">
32
- <vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
33
- @custom="$vxeTableUtil.customHandle">
34
- <template #form>
35
- <div class="clearfix screen-btns">
36
- <div class="fl">
37
- <base-table-export :option="{ title: $t1('访问统计导出'), targetRef: 'table-m1'}"
38
- :parent-target="_self"/>
39
- </div>
40
- <div class="fr">
41
- <vxe-button status="warning" icon="iconfont icon-shaixuan" class="button-sty orgn"
42
- @click="showAdvancedSearch = true">{{ $t1('高级筛选') }}
43
- </vxe-button>
44
- <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
45
- plain>{{ $t1('重置') }}
46
- </vxe-button>
47
- <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
48
- {{ $t1('搜索') }}
49
- </vxe-button>
50
- </div>
51
- </div>
52
- <vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
53
- @submit="searchEvent" @reset="searchEvent">
54
- <vxe-form-item :title="$t1('操作类型')+':'">
55
- <template v-slot>
56
- <el-input v-model="checkNode.label" :disabled="true"></el-input>
57
- </template>
58
- </vxe-form-item>
59
- <vxe-form-item :title="$t1('访问日期')+':'">
60
- <template v-slot>
61
- <el-date-picker
62
- v-model="formData.startTime"
63
- type="date"
64
- placeholder=""
65
- size="small"
66
- clearable
67
- value-format="yyyy-MM-dd"
68
- :picker-options="$baseStartPickerOptions(formData.endTime)"
69
- ></el-date-picker>
70
- <span>-</span>
71
- <el-date-picker
72
- v-model="formData.endTime"
73
- type="date"
74
- placeholder=""
75
- size="small"
76
- clearable
77
- value-format="yyyy-MM-dd"
78
- :picker-options="$baseEndPickerOptions(formData.startTime)"
79
- ></el-date-picker>
80
- </template>
81
- </vxe-form-item>
82
- </vxe-form>
83
- </template>
84
- </vxe-grid>
85
- </div>
86
- </div>
87
- </el-tab-pane>
88
- <el-tab-pane :label="$t1('统计')" name="third">
89
- <statistics_list v-if="showStatisticsList"></statistics_list>
90
- </el-tab-pane>
91
- </el-tabs>
92
- <advancedSearchDialog v-if="showAdvancedSearch" :visiable.sync="showAdvancedSearch"
93
- :formData.sync="advancedFormData" @confirm="searchEvent">
94
- <template #form>
95
- <vxe-form :model="advancedFormData" title-width="102px" :inline="true" class="adSearchForm">
96
- <vxe-form-item :title="$t1('操作内容') + ':'" class-name="block">
97
- <template v-slot>
98
- <el-input v-model="advancedFormData.content" size="small" clearable></el-input>
99
- </template>
100
- </vxe-form-item>
101
- <vxe-form-item :title="$t1('冗余字段1') +':'">
102
- <template v-slot>
103
- <el-input v-model="advancedFormData.param1" size="small" clearable></el-input>
104
- </template>
105
- </vxe-form-item>
106
- <vxe-form-item :title="$t1('冗余字段2') +':'">
107
- <template v-slot>
108
- <el-input v-model="advancedFormData.param2" size="small" clearable></el-input>
109
- </template>
110
- </vxe-form-item>
111
- </vxe-form>
112
- </template>
113
- </advancedSearchDialog>
114
-
115
- </div>
116
- </template>
117
-
118
- <script>
119
- import {treeScollx} from '@base/utils/global.js';
120
- import editView from './edit.vue';
121
- import statistics_list from "./statistics_list.vue";
122
-
123
-
124
- export default {
125
- name: 'access_log:list',
126
- components: {editView, statistics_list},
127
- data() {
128
- return {
129
- activeName: 'second',
130
- dataId: 0,
131
- showEdit: false,
132
- vxeOption: {},
133
- formData: {
134
- startTime: null,
135
- endTime: null
136
- },
137
- checkNode: {},
138
- defaultProps: {
139
- label: 'label', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
140
- children: [],
141
- isLeaf: 'leaf'
142
- },
143
- showWfDialog: false,
144
- wfContentOption: {},
145
- showAdvancedSearch: false,
146
- advancedFormData: {},
147
- showStatisticsList: false,
148
- logTypeMap: {}
149
- };
150
- },
151
- watch: {
152
- activeName(val) {
153
- if (this.showStatisticsList === false && val === "third") {
154
- this.showStatisticsList = true;
155
- }
156
- }
157
- },
158
- computed: {
159
- checkNodeData() {
160
- return this.checkNode && this.checkNode.data ? this.checkNode.data : {};
161
- },
162
- logType() {
163
- let checkNodeData = this.checkNode && this.checkNode.data ? this.checkNode.data : {};
164
- return checkNodeData.value ?? null
165
- }
166
- },
167
- async mounted() {
168
- treeScollx({target: this, type: 'default'});
169
- this.initTableList();
170
- },
171
- methods: {
172
- searchEvent() {
173
- this.$refs['table-m1'].commitProxy('reload');
174
- },
175
- resetEvent() {
176
- this.formData = {};
177
- this.advancedFormData = {};
178
- this.checkFirstNode();
179
- this.$refs['table-m1'].commitProxy('reload');
180
- },
181
- openEditDialog(id) {
182
- this.dataId = !id || typeof id == 'object' ? 0 : id;
183
- this.activeName = 'first';
184
- this.$openEditView('showEdit');
185
- },
186
- initTableList() {
187
- let that = this;
188
- let logTypeMap = this.logTypeMap;
189
- let tableOption = {
190
- vue: this,
191
- tableRef: 'table-m1',
192
- tableName: 'user_access_log_list-m1',
193
- path: USER_PREFIX + '/access_log/listPage',
194
- param: () => {
195
- return {
196
- ...this.formData,
197
- ...this.advancedFormData,
198
- logType: this.logType
199
- // ...checkParam
200
- };
201
- },
202
- columns: [
203
- {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
204
- {
205
- title: this.$t1('操作类型'),
206
- field: 'logTypeName',
207
- fixed: 'left',
208
- width: 150
209
- },
210
- {
211
- title: this.$t1('操作内容'),
212
- field: 'content',
213
- width: 200
214
- },
215
- {
216
- title: this.$t1('请求地址'),
217
- field: 'path',
218
- width: 200
219
- },
220
- {
221
- title: this.$t1('客户端'),
222
- field: 'client',
223
- width: 150
224
- },
225
- {
226
- title: this.$t1('冗余字段1'),
227
- field: 'param1',
228
- width: 150
229
- },
230
- {
231
- title: this.$t1('冗余字段2'),
232
- field: 'param2',
233
- width: 150
234
- },
235
- {
236
- title: this.$t1('操作人'),
237
- field: 'nickName',
238
- width: 150
239
- },
240
- {
241
- title: this.$t1('服务名'),
242
- field: 'serverName',
243
- width: 250
244
- },
245
- {
246
- title: this.$t1('请求IP'),
247
- field: 'ip',
248
- width: 150
249
- },
250
- {
251
- title: this.$t1('创建时间'),
252
- field: 'createDate',
253
- width: 150
254
- },
255
- {
256
- width: 47,
257
- fixed: 'right',
258
- title: '',
259
- sortable: false,
260
- slots: {
261
- default: ({row, rowIndex}) => {
262
- return [
263
- <div>
264
- <a
265
- href="javascript:void(0);"
266
- class="a-link"
267
- onclick={() => {
268
- this.openEditDialog(row.id);
269
- }}
270
- >
271
- <el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
272
- popper-class="tooltip-skin">
273
- <i class="el-icon-edit"/>
274
- </el-tooltip>
275
- </a>
276
- </div>
277
- ];
278
- }
279
- }
280
- }
281
- ]
282
- };
283
- this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
284
- this.vxeOption = opts;
285
- });
286
- },
287
- clearNodeClick() {
288
- this.checkNode = null;
289
- this.formData.startTime = null;
290
- this.formData.endTime = null;
291
- this.$refs.tree.setCurrentKey();
292
- this.searchEvent();
293
- },
294
- handleNodeClick(data, node, v) {
295
- this.checkNode = node;
296
- this.formData.startTime = data.all ? null : data.logDate;
297
- this.formData.endTime = data.all ? null : data.logDate;
298
- this.$forceUpdate();
299
- this.searchEvent();
300
- },
301
- // 异步树叶子节点懒加载逻辑
302
- loadNode(node, resolve) {
303
- this.$http({
304
- url: USER_PREFIX + `/user_log_classify/listPage`,
305
- method: `post`,
306
- data: {
307
- enabled: true
308
- },
309
- success: res => {
310
- let logTypeMap = {};
311
- let rows = res.objx?.records || [];
312
- let items = rows.map(item => {
313
- logTypeMap[item.classifyCode] = item.classifyName;
314
- return {
315
- label: item.classifyName,
316
- value: item.classifyCode,
317
- id: item.classifyCode,
318
- leaf: true,
319
- }
320
- })
321
- this.logTypeMap = logTypeMap;
322
- let data = [
323
- {
324
- label: this.$t1('全部类型'),
325
- all: true,
326
- id: -1,
327
- leaf: true,
328
- },
329
- ...items
330
- ]
331
- resolve(data);
332
- this.$nextTick(() => {
333
- if (node.childNodes.length) {
334
- this.checkFirstNode();
335
- this.$forceUpdate();
336
- }
337
- });
338
- }
339
- });
340
-
341
- },
342
- checkFirstNode() {
343
- let node = this.$refs.tree.getNode(-1);
344
- this.$refs.tree.setCurrentKey(node);
345
- this.checkNode = node;
346
- }
347
- }
348
- };
349
- </script>
1
+ <template>
2
+ <div id="containt">
3
+ <el-tabs v-model="activeName" class="tab-box">
4
+ <el-tab-pane :label="$t1('常规')" name="first">
5
+ <editView v-if="showEdit" visible-key="showEdit" :_dataId.sync="dataId" :parent-target="_self"
6
+ @reload="$reloadHandle"></editView>
7
+ </el-tab-pane>
8
+ <el-tab-pane :label="$t1('列表')" name="second">
9
+ <div class="tree-box fl">
10
+ <div class="tit"><b>{{ $t1('操作类型') }}</b></div>
11
+ <el-tree
12
+ :props="defaultProps"
13
+ :load="loadNode"
14
+ node-key="id"
15
+ ref="tree"
16
+ highlight-current
17
+ lazy
18
+ :expand-on-click-node="false"
19
+ @node-click="handleNodeClick"
20
+ class="tree-list"
21
+ icon-class="el-icon-arrow-down"
22
+ ></el-tree>
23
+ </div>
24
+ <label id="labBtn">
25
+ <div class="icon">
26
+ <i class="el-icon-more"></i>
27
+ <i class="el-icon-more"></i>
28
+ </div>
29
+ </label>
30
+ <div class="main-right fr" style="padding-left:6px;">
31
+ <div class="grid-height">
32
+ <vxe-grid ref="table-m1" v-bind="vxeOption" @resizable-change="$vxeTableUtil.onColumnWitchChange"
33
+ @custom="$vxeTableUtil.customHandle">
34
+ <template #form>
35
+ <div class="clearfix screen-btns">
36
+ <div class="fl">
37
+ <base-table-export :option="{ title: $t1('访问统计导出'), targetRef: 'table-m1'}"
38
+ :parent-target="_self"/>
39
+ </div>
40
+ <div class="fr">
41
+ <vxe-button status="warning" icon="iconfont icon-shaixuan" class="button-sty orgn"
42
+ @click="showAdvancedSearch = true">{{ $t1('高级筛选') }}
43
+ </vxe-button>
44
+ <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
45
+ plain>{{ $t1('重置') }}
46
+ </vxe-button>
47
+ <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
48
+ {{ $t1('搜索') }}
49
+ </vxe-button>
50
+ </div>
51
+ </div>
52
+ <vxe-form ref="form" class="screen-box" title-width="92px" title-align="right" :data="formData"
53
+ @submit="searchEvent" @reset="searchEvent">
54
+ <vxe-form-item :title="$t1('操作类型')+':'">
55
+ <template v-slot>
56
+ <el-input v-model="checkNode.label" :disabled="true"></el-input>
57
+ </template>
58
+ </vxe-form-item>
59
+ <vxe-form-item :title="$t1('访问日期')+':'">
60
+ <template v-slot>
61
+ <el-date-picker
62
+ v-model="formData.startTime"
63
+ type="date"
64
+ placeholder=""
65
+ size="small"
66
+ clearable
67
+ value-format="yyyy-MM-dd"
68
+ :picker-options="$baseStartPickerOptions(formData.endTime)"
69
+ ></el-date-picker>
70
+ <span>-</span>
71
+ <el-date-picker
72
+ v-model="formData.endTime"
73
+ type="date"
74
+ placeholder=""
75
+ size="small"
76
+ clearable
77
+ value-format="yyyy-MM-dd"
78
+ :picker-options="$baseEndPickerOptions(formData.startTime)"
79
+ ></el-date-picker>
80
+ </template>
81
+ </vxe-form-item>
82
+ </vxe-form>
83
+ </template>
84
+ </vxe-grid>
85
+ </div>
86
+ </div>
87
+ </el-tab-pane>
88
+ <el-tab-pane :label="$t1('统计')" name="third">
89
+ <statistics_list v-if="showStatisticsList"></statistics_list>
90
+ </el-tab-pane>
91
+ </el-tabs>
92
+ <advancedSearchDialog v-if="showAdvancedSearch" :visiable.sync="showAdvancedSearch"
93
+ :formData.sync="advancedFormData" @confirm="searchEvent">
94
+ <template #form>
95
+ <vxe-form :model="advancedFormData" title-width="102px" :inline="true" class="adSearchForm">
96
+ <vxe-form-item :title="$t1('操作内容') + ':'" class-name="block">
97
+ <template v-slot>
98
+ <el-input v-model="advancedFormData.content" size="small" clearable></el-input>
99
+ </template>
100
+ </vxe-form-item>
101
+ <vxe-form-item :title="$t1('冗余字段1') +':'">
102
+ <template v-slot>
103
+ <el-input v-model="advancedFormData.param1" size="small" clearable></el-input>
104
+ </template>
105
+ </vxe-form-item>
106
+ <vxe-form-item :title="$t1('冗余字段2') +':'">
107
+ <template v-slot>
108
+ <el-input v-model="advancedFormData.param2" size="small" clearable></el-input>
109
+ </template>
110
+ </vxe-form-item>
111
+ </vxe-form>
112
+ </template>
113
+ </advancedSearchDialog>
114
+
115
+ </div>
116
+ </template>
117
+
118
+ <script>
119
+ import {treeScollx} from '@base/utils/global.js';
120
+ import editView from './edit.vue';
121
+ import statistics_list from "./statistics_list.vue";
122
+
123
+
124
+ export default {
125
+ name: 'access_log:list',
126
+ components: {editView, statistics_list},
127
+ data() {
128
+ return {
129
+ activeName: 'second',
130
+ dataId: 0,
131
+ showEdit: false,
132
+ vxeOption: {},
133
+ formData: {
134
+ startTime: null,
135
+ endTime: null
136
+ },
137
+ checkNode: {},
138
+ defaultProps: {
139
+ label: 'label', //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
140
+ children: [],
141
+ isLeaf: 'leaf'
142
+ },
143
+ showWfDialog: false,
144
+ wfContentOption: {},
145
+ showAdvancedSearch: false,
146
+ advancedFormData: {},
147
+ showStatisticsList: false,
148
+ logTypeMap: {}
149
+ };
150
+ },
151
+ watch: {
152
+ activeName(val) {
153
+ if (this.showStatisticsList === false && val === "third") {
154
+ this.showStatisticsList = true;
155
+ }
156
+ }
157
+ },
158
+ computed: {
159
+ checkNodeData() {
160
+ return this.checkNode && this.checkNode.data ? this.checkNode.data : {};
161
+ },
162
+ logType() {
163
+ let checkNodeData = this.checkNode && this.checkNode.data ? this.checkNode.data : {};
164
+ return checkNodeData.value ?? null
165
+ }
166
+ },
167
+ async mounted() {
168
+ treeScollx({target: this, type: 'default'});
169
+ this.initTableList();
170
+ },
171
+ methods: {
172
+ searchEvent() {
173
+ this.$refs['table-m1'].commitProxy('reload');
174
+ },
175
+ resetEvent() {
176
+ this.formData = {};
177
+ this.advancedFormData = {};
178
+ this.checkFirstNode();
179
+ this.$refs['table-m1'].commitProxy('reload');
180
+ },
181
+ openEditDialog(id) {
182
+ this.dataId = !id || typeof id == 'object' ? 0 : id;
183
+ this.activeName = 'first';
184
+ this.$openEditView('showEdit');
185
+ },
186
+ initTableList() {
187
+ let that = this;
188
+ let logTypeMap = this.logTypeMap;
189
+ let tableOption = {
190
+ vue: this,
191
+ tableRef: 'table-m1',
192
+ tableName: 'user_access_log_list-m1',
193
+ path: USER_PREFIX + '/access_log/listPage',
194
+ param: () => {
195
+ return {
196
+ ...this.formData,
197
+ ...this.advancedFormData,
198
+ logType: this.logType
199
+ // ...checkParam
200
+ };
201
+ },
202
+ columns: [
203
+ {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
204
+ {
205
+ title: this.$t1('操作类型'),
206
+ field: 'logTypeName',
207
+ fixed: 'left',
208
+ width: 150
209
+ },
210
+ {
211
+ title: this.$t1('操作内容'),
212
+ field: 'content',
213
+ width: 200
214
+ },
215
+ {
216
+ title: this.$t1('请求地址'),
217
+ field: 'path',
218
+ width: 200
219
+ },
220
+ {
221
+ title: this.$t1('客户端'),
222
+ field: 'client',
223
+ width: 150
224
+ },
225
+ {
226
+ title: this.$t1('冗余字段1'),
227
+ field: 'param1',
228
+ width: 150
229
+ },
230
+ {
231
+ title: this.$t1('冗余字段2'),
232
+ field: 'param2',
233
+ width: 150
234
+ },
235
+ {
236
+ title: this.$t1('操作人'),
237
+ field: 'nickName',
238
+ width: 150
239
+ },
240
+ {
241
+ title: this.$t1('服务名'),
242
+ field: 'serverName',
243
+ width: 250
244
+ },
245
+ {
246
+ title: this.$t1('请求IP'),
247
+ field: 'ip',
248
+ width: 150
249
+ },
250
+ {
251
+ title: this.$t1('创建时间'),
252
+ field: 'createDate',
253
+ width: 150
254
+ },
255
+ {
256
+ width: 47,
257
+ fixed: 'right',
258
+ title: '',
259
+ sortable: false,
260
+ slots: {
261
+ default: ({row, rowIndex}) => {
262
+ return [
263
+ <div>
264
+ <a
265
+ href="javascript:void(0);"
266
+ class="a-link"
267
+ onclick={() => {
268
+ this.openEditDialog(row.id);
269
+ }}
270
+ >
271
+ <el-tooltip enterable={false} effect="dark" content={this.$t1('查看')} placement="top"
272
+ popper-class="tooltip-skin">
273
+ <i class="el-icon-edit"/>
274
+ </el-tooltip>
275
+ </a>
276
+ </div>
277
+ ];
278
+ }
279
+ }
280
+ }
281
+ ]
282
+ };
283
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
284
+ this.vxeOption = opts;
285
+ });
286
+ },
287
+ clearNodeClick() {
288
+ this.checkNode = null;
289
+ this.formData.startTime = null;
290
+ this.formData.endTime = null;
291
+ this.$refs.tree.setCurrentKey();
292
+ this.searchEvent();
293
+ },
294
+ handleNodeClick(data, node, v) {
295
+ this.checkNode = node;
296
+ this.formData.startTime = data.all ? null : data.logDate;
297
+ this.formData.endTime = data.all ? null : data.logDate;
298
+ this.$forceUpdate();
299
+ this.searchEvent();
300
+ },
301
+ // 异步树叶子节点懒加载逻辑
302
+ loadNode(node, resolve) {
303
+ this.$http({
304
+ url: USER_PREFIX + `/user_log_classify/listPage`,
305
+ method: `post`,
306
+ data: {
307
+ enabled: true
308
+ },
309
+ success: res => {
310
+ let logTypeMap = {};
311
+ let rows = res.objx?.records || [];
312
+ let items = rows.map(item => {
313
+ logTypeMap[item.classifyCode] = item.classifyName;
314
+ return {
315
+ label: item.classifyName,
316
+ value: item.classifyCode,
317
+ id: item.classifyCode,
318
+ leaf: true,
319
+ }
320
+ })
321
+ this.logTypeMap = logTypeMap;
322
+ let data = [
323
+ {
324
+ label: this.$t1('全部类型'),
325
+ all: true,
326
+ id: -1,
327
+ leaf: true,
328
+ },
329
+ ...items
330
+ ]
331
+ resolve(data);
332
+ this.$nextTick(() => {
333
+ if (node.childNodes.length) {
334
+ this.checkFirstNode();
335
+ this.$forceUpdate();
336
+ }
337
+ });
338
+ }
339
+ });
340
+
341
+ },
342
+ checkFirstNode() {
343
+ let node = this.$refs.tree.getNode(-1);
344
+ this.$refs.tree.setCurrentKey(node);
345
+ this.checkNode = node;
346
+ }
347
+ }
348
+ };
349
+ </script>