cloud-web-corejs 1.0.54-dev.453 → 1.0.54-dev.456

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.453",
4
+ "version": "1.0.54-dev.456",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -1,18 +1,25 @@
1
1
  <template>
2
- <el-dropdown @command="exportBill" trigger="hover"
3
- v-if="exportTemplates.length>0">
4
-
2
+ <el-dropdown @command="exportBill" trigger="hover" v-if="exportTemplates.length > 0">
5
3
  <el-button type="primary" class="button-sty" size="mini">
6
- <span>{{ buttonName }}</span><span class="line"></span> <i class="el-icon-arrow-down el-icon--right"></i>
4
+ <span>{{ buttonName }}</span
5
+ ><span class="line"></span> <i class="el-icon-arrow-down el-icon--right"></i>
7
6
  </el-button>
8
7
  <el-dropdown-menu slot="dropdown">
9
- <template v-for="(item,index) in exportTemplates">
10
- <el-dropdown-item v-if="item.etType == 0 || item.etType == 1" icon="el-icon-upload2" :command="item"
11
- :key="index">
8
+ <template v-for="(item, index) in exportTemplates">
9
+ <el-dropdown-item
10
+ v-if="item.etType == 0 || item.etType == 1 || item.etType == 5"
11
+ icon="el-icon-upload2"
12
+ :command="item"
13
+ :key="index"
14
+ >
12
15
  {{ item.etName }}
13
16
  </el-dropdown-item>
14
- <el-dropdown-item v-else-if="printTypes.includes(item.etType)" icon="el-icon-printer" :command="item"
15
- :key="index">
17
+ <el-dropdown-item
18
+ v-else-if="printTypes.includes(item.etType)"
19
+ icon="el-icon-printer"
20
+ :command="item"
21
+ :key="index"
22
+ >
16
23
  {{ item.etName }}
17
24
  </el-dropdown-item>
18
25
  </template>
@@ -21,11 +28,11 @@
21
28
  </template>
22
29
 
23
30
  <script>
24
- import mixins from "./mixins.js"
31
+ import mixins from "./mixins.js";
25
32
 
26
33
  export default {
27
- name: 'baseInputExport',
28
- mixins: [mixins]
34
+ name: "baseInputExport",
35
+ mixins: [mixins],
29
36
  };
30
37
  </script>
31
38
 
@@ -93,7 +93,9 @@ let chartContainers = [],
93
93
  multiTabLabelField:null,
94
94
  addFormCode: null,
95
95
  addFormName: null,
96
- wfTheme: null
96
+ wfTheme: null,
97
+ otherTabEnabled:false,
98
+ otherTabList:[]
97
99
  },
98
100
  dataSources: [], //数据源
99
101
 
@@ -170,6 +170,54 @@
170
170
  <el-input type="text" v-model="formConfig.multiTabLabelField"></el-input>
171
171
  </el-form-item>
172
172
  </el-collapse-item>
173
+ <el-collapse-item name="2" title="其他标签页信息">
174
+ <el-form-item :label="i18nt('启用其他标签页')">
175
+ <el-switch v-model="formConfig.otherTabEnabled"></el-switch>
176
+ </el-form-item>
177
+ <el-form-item :label="i18nt('其他标签页配置')"> </el-form-item>
178
+ <el-form-item label-width="0">
179
+ <div>
180
+ <draggable
181
+ tag="ul"
182
+ class="draggable-box"
183
+ :list="formConfig.otherTabList"
184
+ v-bind="{
185
+ group: 'optionsGroup',
186
+ ghostClass: 'ghost',
187
+ handle: '.drag-option',
188
+ }"
189
+ >
190
+ <li v-for="(option, idx) in formConfig.otherTabList" :key="idx">
191
+ <el-input
192
+ v-model="option.label"
193
+ size="mini"
194
+ style="width: 100px"
195
+ placeholder="标签名称"
196
+ ></el-input>
197
+ <el-input
198
+ v-model="option.formCode"
199
+ size="mini"
200
+ style="width: 100px"
201
+ placeholder="表单模板编码"
202
+ ></el-input>
203
+ <i class="el-icon-s-operation drag-option"></i>
204
+ <el-button
205
+ circle
206
+ plain
207
+ size="mini"
208
+ type="danger"
209
+ @click="formConfig.otherTabList.splice(idx, 1)"
210
+ icon="el-icon-minus"
211
+ class="col-delete-button"
212
+ ></el-button>
213
+ </li>
214
+ </draggable>
215
+ <el-button type="text" @click="addOtherTab">{{
216
+ i18nt("designer.setting.addOption")
217
+ }}</el-button>
218
+ </div>
219
+ </el-form-item>
220
+ </el-collapse-item>
173
221
 
174
222
  <el-collapse-item name="3" title="详情表单信息">
175
223
  <el-form-item :label="i18nt('查看页面表单编码')">
@@ -1310,6 +1358,15 @@ $\{wf.starterName\}提交的$\{pm_product_project.product_code\}$\{pm_product_pr
1310
1358
  item.companyCodes = row.bdCompanyCode;
1311
1359
  }
1312
1360
  },
1361
+ addOtherTab() {
1362
+ if (!this.formConfig.otherTabList) {
1363
+ this.$set(this.formConfig, "otherTabList", []);
1364
+ }
1365
+ this.formConfig.otherTabList.push({
1366
+ label: null,
1367
+ formCode: null,
1368
+ });
1369
+ },
1313
1370
  },
1314
1371
  };
1315
1372
  </script>
@@ -177,7 +177,7 @@
177
177
  <el-table-column type="index" width="35" fixed="left"></el-table-column>
178
178
  <el-table-column :label="i18nt('流程动作')" width="150">
179
179
  <template slot-scope="{ row }">
180
- <el-select v-model="row.action">
180
+ <el-select v-model="row.action" @change="row.toValue = null">
181
181
  <el-option value="start" label="流程启动"></el-option>
182
182
  <el-option value="interrupt" label="流程中断"></el-option>
183
183
  <el-option value="end" label="流程完成"></el-option>
@@ -196,7 +196,26 @@
196
196
  </el-table-column>-->
197
197
  <el-table-column :label="i18nt('设置的值')" width="650">
198
198
  <template slot-scope="{ row }">
199
- <el-input v-model="row.toValue" clearable></el-input>
199
+ <el-select
200
+ v-model="row.toValue"
201
+ clearable
202
+ style="width: 100%"
203
+ v-if="row.action === 'specificAction'"
204
+ >
205
+ <el-option value="wfCreateDate" label="流程创建(启动)时间"></el-option>
206
+ <el-option value="wfModifyDate" label="流程更新时间"></el-option>
207
+ <el-option value="wfInterruptDate" label="流程中断时间"></el-option>
208
+ <el-option value="wfEndDate" label="流程完成时间"></el-option>
209
+ <el-option value="wfStarterName" label="启动人姓名"></el-option>
210
+ <el-option value="wfName" label="流程模板名称"></el-option>
211
+ <el-option value="wfUuid" label="流程实例uuid"></el-option>
212
+ <el-option value="objTypeCode" label="流程单据类型编码"></el-option>
213
+ <el-option value="wfCandidateNames" label="当前审批人名"></el-option>
214
+ <el-option value="wfTaskName" label="当前审批节点名"></el-option>
215
+ <el-option value="wfStat" label="流程状态"></el-option>
216
+ <el-option value="wfSubjectName" label="流程主题名称"></el-option>
217
+ </el-select>
218
+ <el-input v-model="row.toValue" clearable v-else></el-input>
200
219
  <!-- <el-input v-model="row.toValue" clearable v-if="row.valueType==1"></el-input>
201
220
  <base-input-number v-model="row.toValue" clearable v-else-if="row.valueType==2"></base-input-number>
202
221
  <el-radio-group v-model="row.toValue" v-else-if="row.valueType==3">
@@ -860,7 +860,9 @@ export function getDefaultFormConfig() {
860
860
  multiTabLabelField:null,
861
861
  addFormCode:null,
862
862
  addFormName: null,
863
- wfTheme: null
863
+ wfTheme: null,
864
+ otherTabEnabled:false,
865
+ otherTabList:[]
864
866
  };
865
867
  }
866
868
 
@@ -1,349 +1,418 @@
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
6
+ v-if="showEdit"
7
+ visible-key="showEdit"
8
+ :_dataId.sync="dataId"
9
+ :parent-target="_self"
10
+ @reload="$reloadHandle"
11
+ ></editView>
12
+ </el-tab-pane>
13
+ <el-tab-pane :label="$t1('列表')" name="second">
14
+ <div class="tree-box fl">
15
+ <div class="tit">
16
+ <b>{{ $t1("操作类型") }}</b>
17
+ </div>
18
+ <el-tree
19
+ :props="defaultProps"
20
+ :load="loadNode"
21
+ node-key="id"
22
+ ref="tree"
23
+ highlight-current
24
+ lazy
25
+ :expand-on-click-node="false"
26
+ @node-click="handleNodeClick"
27
+ class="tree-list"
28
+ icon-class="el-icon-arrow-down"
29
+ ></el-tree>
30
+ </div>
31
+ <label id="labBtn">
32
+ <div class="icon">
33
+ <i class="el-icon-more"></i>
34
+ <i class="el-icon-more"></i>
35
+ </div>
36
+ </label>
37
+ <div class="main-right fr" style="padding-left: 6px">
38
+ <div class="grid-height">
39
+ <vxe-grid
40
+ ref="table-m1"
41
+ v-bind="vxeOption"
42
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
43
+ @custom="$vxeTableUtil.customHandle"
44
+ >
45
+ <template #form>
46
+ <tableForm
47
+ :formData.sync="formData"
48
+ @searchEvent="searchEvent"
49
+ @resetEvent="resetEvent"
50
+ >
51
+ <template #buttonLeft>
52
+ <base-table-export
53
+ :option="{ title: $t1('访问统计导出'), targetRef: 'table-m1' }"
54
+ :parent-target="_self"
55
+ />
56
+ </template>
57
+ <template #buttonRight>
58
+ <vxe-button
59
+ icon="el-icon-brush"
60
+ class="button-sty"
61
+ @click="resetEvent"
62
+ type="text"
63
+ status="primary"
64
+ plain
65
+ >{{ $t1("重置") }}
66
+ </vxe-button>
67
+ <vxe-button
68
+ status="warning"
69
+ icon="el-icon-search"
70
+ class="button-sty"
71
+ @click="searchEvent"
72
+ >
73
+ {{ $t1("搜索") }}
74
+ </vxe-button>
75
+ </template>
76
+ <template #operateType>
77
+ <vxe-form-item :title="$t1('操作类型') + ':'">
78
+ <template v-slot>
79
+ <el-input v-model="checkNode.label" :disabled="true"></el-input>
80
+ </template>
81
+ </vxe-form-item>
82
+ </template>
83
+ </tableForm>
84
+ <!-- <vxe-form
85
+ ref="form"
86
+ class="screen-box"
87
+ title-width="92px"
88
+ title-align="right"
89
+ :data="formData"
90
+ @submit="searchEvent"
91
+ @reset="searchEvent"
92
+ >
93
+ <vxe-form-item :title="$t1('操作类型') + ':'">
94
+ <template v-slot>
95
+ <el-input v-model="checkNode.label" :disabled="true"></el-input>
96
+ </template>
97
+ </vxe-form-item>
98
+ <vxe-form-item :title="$t1('访问日期') + ':'">
99
+ <template v-slot>
100
+ <el-date-picker
101
+ v-model="formData.startTime"
102
+ type="date"
103
+ placeholder=""
104
+ size="small"
105
+ clearable
106
+ value-format="yyyy-MM-dd"
107
+ :picker-options="$baseStartPickerOptions(formData.endTime)"
108
+ ></el-date-picker>
109
+ <span>-</span>
110
+ <el-date-picker
111
+ v-model="formData.endTime"
112
+ type="date"
113
+ placeholder=""
114
+ size="small"
115
+ clearable
116
+ value-format="yyyy-MM-dd"
117
+ :picker-options="$baseEndPickerOptions(formData.startTime)"
118
+ ></el-date-picker>
119
+ </template>
120
+ </vxe-form-item>
121
+ </vxe-form> -->
122
+ </template>
123
+ </vxe-grid>
124
+ </div>
125
+ </div>
126
+ </el-tab-pane>
127
+ <el-tab-pane :label="$t1('统计')" name="third">
128
+ <statistics_list v-if="showStatisticsList"></statistics_list>
129
+ </el-tab-pane>
130
+ </el-tabs>
131
+ </div>
132
+ </template>
133
+
134
+ <script>
135
+ import { treeScollx } from "@base/utils/global.js";
136
+ import editView from "./edit.vue";
137
+ import statistics_list from "./statistics_list.vue";
138
+ import tableForm from "@base/components/table/tableForm";
139
+
140
+ export default {
141
+ name: "access_log:list",
142
+ components: { tableForm, editView, statistics_list },
143
+ data() {
144
+ return {
145
+ activeName: "second",
146
+ dataId: 0,
147
+ showEdit: false,
148
+ vxeOption: {},
149
+ formData: {
150
+ startTime: null,
151
+ endTime: null,
152
+ },
153
+ checkNode: {},
154
+ defaultProps: {
155
+ label: "label", //这里是树结构中需显示的数据(即接口返回的需展示在页面上的参数)
156
+ children: [],
157
+ isLeaf: "leaf",
158
+ },
159
+ showWfDialog: false,
160
+ wfContentOption: {},
161
+ showAdvancedSearch: false,
162
+ advancedFormData: {},
163
+ showStatisticsList: false,
164
+ logTypeMap: {},
165
+ };
166
+ },
167
+ watch: {
168
+ activeName(val) {
169
+ if (this.showStatisticsList === false && val === "third") {
170
+ this.showStatisticsList = true;
171
+ }
172
+ },
173
+ },
174
+ computed: {
175
+ checkNodeData() {
176
+ return this.checkNode && this.checkNode.data ? this.checkNode.data : {};
177
+ },
178
+ logType() {
179
+ let checkNodeData =
180
+ this.checkNode && this.checkNode.data ? this.checkNode.data : {};
181
+ return checkNodeData.value ?? null;
182
+ },
183
+ },
184
+ async mounted() {
185
+ treeScollx({ target: this, type: "default" });
186
+ this.initTableList();
187
+ },
188
+ methods: {
189
+ searchEvent() {
190
+ this.$refs["table-m1"].commitProxy("reload");
191
+ },
192
+ resetEvent() {
193
+ this.formData = {};
194
+ this.advancedFormData = {};
195
+ this.checkFirstNode();
196
+ this.$refs["table-m1"].commitProxy("reload");
197
+ },
198
+ openEditDialog(id) {
199
+ this.dataId = !id || typeof id == "object" ? 0 : id;
200
+ this.activeName = "first";
201
+ this.$openEditView("showEdit");
202
+ },
203
+ initTableList() {
204
+ let that = this;
205
+ let logTypeMap = this.logTypeMap;
206
+ let tableOption = {
207
+ vue: this,
208
+ tableRef: "table-m1",
209
+ tableName: "user_access_log_list-m1",
210
+ path: USER_PREFIX + "/access_log/listPage",
211
+ param: () => {
212
+ return {
213
+ ...this.formData,
214
+ // ...this.advancedFormData,
215
+ logType: this.logType,
216
+ // ...checkParam
217
+ };
218
+ },
219
+ columns: [
220
+ { type: "checkbox", width: 48, resizable: false, fixed: "left" },
221
+ {
222
+ title: this.$t1("操作类型"),
223
+ field: "logTypeName",
224
+ fixed: "left",
225
+ width: 150,
226
+ },
227
+ {
228
+ title: this.$t1("操作内容"),
229
+ field: "content",
230
+ width: 200,
231
+ },
232
+ {
233
+ title: this.$t1("请求地址"),
234
+ field: "path",
235
+ width: 200,
236
+ },
237
+ {
238
+ title: this.$t1("客户端"),
239
+ field: "client",
240
+ width: 150,
241
+ },
242
+ {
243
+ title: this.$t1("冗余字段1"),
244
+ field: "param1",
245
+ width: 150,
246
+ },
247
+ {
248
+ title: this.$t1("冗余字段2"),
249
+ field: "param2",
250
+ width: 150,
251
+ },
252
+ {
253
+ title: this.$t1("操作人"),
254
+ field: "nickName",
255
+ width: 150,
256
+ },
257
+ {
258
+ title: this.$t1("服务名"),
259
+ field: "serverName",
260
+ width: 250,
261
+ },
262
+ {
263
+ title: this.$t1("请求IP"),
264
+ field: "ip",
265
+ width: 150,
266
+ },
267
+ {
268
+ title: this.$t1("创建时间"),
269
+ field: "createDate",
270
+ width: 150,
271
+ },
272
+ {
273
+ width: 47,
274
+ fixed: "right",
275
+ title: "",
276
+ sortable: false,
277
+ slots: {
278
+ default: ({ row, rowIndex }) => {
279
+ return [
280
+ <div>
281
+ <a
282
+ href="javascript:void(0);"
283
+ class="a-link"
284
+ onclick={() => {
285
+ this.openEditDialog(row.id);
286
+ }}
287
+ >
288
+ <el-tooltip
289
+ enterable={false}
290
+ effect="dark"
291
+ content={this.$t1("查看")}
292
+ placement="top"
293
+ popper-class="tooltip-skin"
294
+ >
295
+ <i class="el-icon-edit" />
296
+ </el-tooltip>
297
+ </a>
298
+ </div>,
299
+ ];
300
+ },
301
+ },
302
+ },
303
+ ],
304
+ searchColumns: [
305
+ {
306
+ title: this.$t1("操作类型"),
307
+ field: "operateType",
308
+ type: "input",
309
+ common: true,
310
+ slot: "operateType",
311
+ },
312
+ {
313
+ title: this.$t1("访问日期"),
314
+ field: "startTime",
315
+ field2: "endTime",
316
+ type: "dateRange",
317
+ common: true,
318
+ widgetType: "date",
319
+ valueFormat: "yyyy-MM-dd",
320
+ },
321
+ {
322
+ title: this.$t1("操作人"),
323
+ field: "nickName",
324
+ type: "input",
325
+ common: true,
326
+ },
327
+ {
328
+ title: this.$t1("操作内容"),
329
+ field: "content",
330
+ type: "input",
331
+ common: false,
332
+ },
333
+ {
334
+ title: this.$t1("请求IP"),
335
+ field: "ip",
336
+ type: "input",
337
+ common: false,
338
+ },
339
+ {
340
+ title: this.$t1("冗余字段1"),
341
+ field: "param1",
342
+ type: "input",
343
+ common: false,
344
+ },
345
+ {
346
+ title: this.$t1("冗余字段2"),
347
+ field: "param2",
348
+ type: "input",
349
+ common: false,
350
+ },
351
+ ],
352
+ };
353
+ this.$vxeTableUtil.initVxeTable(tableOption).then((opts) => {
354
+ this.vxeOption = opts;
355
+ });
356
+ },
357
+ clearNodeClick() {
358
+ this.checkNode = null;
359
+ this.formData.startTime = null;
360
+ this.formData.endTime = null;
361
+ this.$refs.tree.setCurrentKey();
362
+ this.searchEvent();
363
+ },
364
+ handleNodeClick(data, node, v) {
365
+ this.checkNode = node;
366
+ this.formData.startTime = data.all ? null : data.logDate;
367
+ this.formData.endTime = data.all ? null : data.logDate;
368
+ this.$forceUpdate();
369
+ this.searchEvent();
370
+ },
371
+ // 异步树叶子节点懒加载逻辑
372
+ loadNode(node, resolve) {
373
+ this.$http({
374
+ url: USER_PREFIX + `/user_log_classify/listPage`,
375
+ method: `post`,
376
+ data: {
377
+ enabled: true,
378
+ },
379
+ success: (res) => {
380
+ let logTypeMap = {};
381
+ let rows = res.objx?.records || [];
382
+ let items = rows.map((item) => {
383
+ logTypeMap[item.classifyCode] = item.classifyName;
384
+ return {
385
+ label: item.classifyName,
386
+ value: item.classifyCode,
387
+ id: item.classifyCode,
388
+ leaf: true,
389
+ };
390
+ });
391
+ this.logTypeMap = logTypeMap;
392
+ let data = [
393
+ {
394
+ label: this.$t1("全部类型"),
395
+ all: true,
396
+ id: -1,
397
+ leaf: true,
398
+ },
399
+ ...items,
400
+ ];
401
+ resolve(data);
402
+ this.$nextTick(() => {
403
+ if (node.childNodes.length) {
404
+ this.checkFirstNode();
405
+ this.$forceUpdate();
406
+ }
407
+ });
408
+ },
409
+ });
410
+ },
411
+ checkFirstNode() {
412
+ let node = this.$refs.tree.getNode(-1);
413
+ this.$refs.tree.setCurrentKey(node);
414
+ this.checkNode = node;
415
+ },
416
+ },
417
+ };
418
+ </script>
@@ -32,6 +32,28 @@
32
32
  ></vFormRender>
33
33
  </div>
34
34
  </el-tab-pane>
35
+ <el-tab-pane
36
+ v-for="(item, index) in otherTabList"
37
+ :key="index"
38
+ :label="$t2(item.label)"
39
+ :name="`otherTab${index}`"
40
+ >
41
+ <div class="grid-height">
42
+ <vFormRender
43
+ :ref="`list${index}`"
44
+ :formCode.sync="item.formCode"
45
+ :dataId.sync="item.dataId"
46
+ :param="item.param"
47
+ v-if="item.showContent"
48
+ :parent-target="_self"
49
+ @reload="
50
+ (...args) => {
51
+ reloadAutoContent(...args);
52
+ }
53
+ "
54
+ ></vFormRender>
55
+ </div>
56
+ </el-tab-pane>
35
57
  <template #editTab="{ tab, index, reloadTabContent }">
36
58
  <el-tab-pane
37
59
  :key="tab.data.id"
@@ -124,8 +146,21 @@ export default {
124
146
  param: {},
125
147
  multiTabLabelField: null,
126
148
  formData: null,
149
+ otherTabList: [],
127
150
  };
128
151
  },
152
+ watch: {
153
+ activeName(val) {
154
+ if (
155
+ this.formJson.formConfig.otherTabEnabled &&
156
+ this.otherTabList.length > 0 &&
157
+ val.startsWith("otherTab")
158
+ ) {
159
+ let num = Number(val.substring("otherTab".length));
160
+ this.otherTabList[num].showContent = true;
161
+ }
162
+ },
163
+ },
129
164
  created() {
130
165
  this.initParam();
131
166
  this.getReportTemplate();
@@ -168,6 +203,7 @@ export default {
168
203
  }
169
204
  this.addFormCode = addFormCode;
170
205
  this.multiTabLabelField = formJson.formConfig?.multiTabLabelField;
206
+ this.initOtherTabList();
171
207
  },
172
208
  });
173
209
  },
@@ -231,6 +267,38 @@ export default {
231
267
  this.formData = {};
232
268
  this.$reloadHandle(...arguments);
233
269
  },
270
+ initOtherTabList() {
271
+ if (!this.formJson.formConfig.otherTabEnabled) return;
272
+ this.otherTabList = this.formJson.formConfig.otherTabList
273
+ .filter((item) => !!item.formCode && !!item.label)
274
+ .map((item) => {
275
+ return {
276
+ label: item.label,
277
+ formCode: item.formCode,
278
+ showContent: false,
279
+ dataId: null,
280
+ param: null,
281
+ };
282
+ });
283
+ },
284
+ reloadAutoContent(target, param, tab) {
285
+ let updateParam =
286
+ param != null && param.updateParam != null ? param.updateParam : {};
287
+ for (let key in updateParam) {
288
+ target.$emit("update:" + key, updateParam[key]);
289
+ }
290
+
291
+ if (!tab) {
292
+ let activeName = this.activeName;
293
+ tab = this.tabs.find((item) => item.label == activeName);
294
+ }
295
+ if (tab) {
296
+ tab.showContent = false;
297
+ setTimeout(() => {
298
+ tab.showContent = true;
299
+ }, 200);
300
+ }
301
+ },
234
302
  },
235
303
  };
236
304
  </script>