cloud-web-corejs 1.0.51 → 1.0.52

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.51",
4
+ "version": "1.0.52",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -145,13 +145,7 @@ export default {
145
145
  showAdvancedSearch: false,
146
146
  advancedFormData: {},
147
147
  showStatisticsList: false,
148
- logTypeMap: {
149
- 'login': this.$t1('登录成功'),
150
- 'loginFailed': this.$t1('登录失败'),
151
- 'logout': this.$t1('退出登录'),
152
- 'accessMenu': this.$t1('访问菜单'),
153
- 'changePassword': this.$t1('修改密码')
154
- }
148
+ logTypeMap: {}
155
149
  };
156
150
  },
157
151
  watch: {
@@ -209,14 +203,9 @@ export default {
209
203
  {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
210
204
  {
211
205
  title: this.$t1('操作类型'),
212
- field: 'logType',
206
+ field: 'logTypeName',
213
207
  fixed: 'left',
214
- width: 150,
215
- slots: {
216
- default: ({row, rowIndex}) => {
217
- return logTypeMap[row.logType] || '';
218
- }
219
- }
208
+ width: 150
220
209
  },
221
210
  {
222
211
  title: this.$t1('操作内容'),
@@ -311,30 +300,44 @@ export default {
311
300
  },
312
301
  // 异步树叶子节点懒加载逻辑
313
302
  loadNode(node, resolve) {
314
- let logTypeMap = this.logTypeMap;
315
- let data = [
316
- {
317
- label: this.$t1('全部类型'),
318
- all: true,
319
- id: -1,
320
- leaf: true,
303
+ this.$http({
304
+ url: USER_PREFIX + `/user_log_classify/listPage`,
305
+ method: `post`,
306
+ data: {
307
+ enabled: true
321
308
  },
322
- ...Object.keys(logTypeMap).map(key => {
323
- return {
324
- label: logTypeMap[key],
325
- value: key,
326
- id: key,
327
- leaf: true,
328
- }
329
- })
330
- ]
331
- resolve(data);
332
- this.$nextTick(() => {
333
- if (node.childNodes.length) {
334
- this.checkFirstNode();
335
- this.$forceUpdate();
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
+ });
336
338
  }
337
339
  });
340
+
338
341
  },
339
342
  checkFirstNode() {
340
343
  let node = this.$refs.tree.getNode(-1);