cloud-web-corejs 1.0.14 → 1.0.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 (38) hide show
  1. package/package.json +1 -1
  2. package/src/components/jsonImport/exportDialog.vue +63 -0
  3. package/src/components/jsonImport/index.js +3 -1
  4. package/src/components/jsonImport/index.vue +6 -5
  5. package/src/components/jsonImport/mixins.js +1 -1
  6. package/src/components/xform/form-designer/form-widget/dialog/preformDialog.vue +77 -0
  7. package/src/components/xform/form-designer/index.vue +13 -3
  8. package/src/components/xform/form-designer/indexMixin.js +4 -3
  9. package/src/components/xform/form-designer/setting-panel/property-editor/field-accessUrl/accessUrl-editor.vue +1 -1
  10. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
  11. package/src/components/xform/form-render/container-item/containerItemMixin.js +11 -11
  12. package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -1
  13. package/src/layout/components/Sidebar/default.vue +1226 -0
  14. package/src/layout/components/Sidebar/index.vue +5 -1178
  15. package/src/layout/defaultLayout.vue +150 -0
  16. package/src/layout/index.vue +4 -138
  17. package/src/permission.js +1 -1
  18. package/src/router/modules/customer.js +1 -1
  19. package/src/router/modules/system.js +2 -2
  20. package/src/store/modules/permission.js +4 -3
  21. package/src/views/bd/setting/bd_attach_setting/list.vue +64 -45
  22. package/src/views/bd/setting/form_script/edit.vue +40 -25
  23. package/src/views/bd/setting/form_script/edit1.vue +40 -25
  24. package/src/views/bd/setting/form_script/list.vue +13 -8
  25. package/src/views/bd/setting/form_script/list1.vue +74 -37
  26. package/src/views/bd/setting/form_template/edit.vue +41 -25
  27. package/src/views/bd/setting/form_template/list.vue +72 -58
  28. package/src/views/bd/setting/form_template/preformDialog.vue +77 -0
  29. package/src/views/bd/setting/menu_kind/authDialog.vue +308 -0
  30. package/src/views/bd/setting/menu_kind/dialog.vue +3 -0
  31. package/src/views/bd/setting/menu_kind/list.vue +35 -9
  32. package/src/views/bd/setting/table_model/edit.vue +48 -34
  33. package/src/views/bd/setting/table_model/list.vue +72 -33
  34. package/src/views/user/home/index.vue +4 -2
  35. package/src/views/user/login/indexMixin.js +45 -21
  36. package/src/views/user/user/form_edit.vue +483 -0
  37. package/src/views/user/user/form_list.vue +348 -0
  38. package/src/views/user/user/list.vue +2 -2
@@ -10,7 +10,8 @@
10
10
  <template #buttonLeft>
11
11
  <vxe-button status="success" class="button-sty" icon="el-icon-download" @click="jsonImport">导入发布
12
12
  </vxe-button>
13
- <vxe-button status="success" class="button-sty" icon="el-icon-upload2" @click="jsonExport" v-if="isDev">导出发布
13
+ <vxe-button status="success" class="button-sty" icon="el-icon-upload2" @click="jsonExport"
14
+ v-if="isDev">导出发布
14
15
  </vxe-button>
15
16
  </template>
16
17
  <template #buttonRight>
@@ -39,14 +40,18 @@
39
40
  </a>
40
41
  </template>
41
42
  <template v-else>
42
- <a class="a-link" data-tit="新增" @click="insertChildEvent(obj)">
43
+ <a class="a-link" @click="insertChildEvent(obj)" v-if="obj.row.addAuth">
43
44
  <el-tooltip :enterable="false" effect="dark" content="新增" placement="top"
44
45
  popper-class="tooltip-skin"><i class="el-icon-circle-plus-outline"></i></el-tooltip>
45
46
  </a>
46
- <a @click="editRowEvent(obj)" class="a-link" data-tit="行编辑" v-if="obj.row">
47
+ <a @click="editRowEvent(obj)" class="a-link" v-if="!obj.row.createDate || obj.row.editAuth">
47
48
  <el-tooltip :enterable="false" effect="dark" content="行编辑" placement="top"
48
49
  popper-class="tooltip-skin"><i class="el-icon-edit-outline"></i></el-tooltip>
49
50
  </a>
51
+ <a @click="openAuthDialog(obj)" class="a-link" v-if="obj.row.authAuth">
52
+ <el-tooltip :enterable="false" effect="dark" content="权限" placement="top"
53
+ popper-class="tooltip-skin"><i class="el-icon-edit-outline"></i></el-tooltip>
54
+ </a>
50
55
  <!-- <a class="a-link" @click="openChangeParentDialog(obj)">
51
56
  <el-tooltip :enterable="false" effect="dark" content="切换上级机构" placement="top" popper-class="tooltip-skin">
52
57
  <i class="el-icon-office-building"></i>
@@ -62,16 +67,22 @@
62
67
  </div>
63
68
  </el-tab-pane>
64
69
  </el-tabs>
70
+ <authDialog v-if="showAuthDialog" :visiable.sync="showAuthDialog" :currentMenuKind="currentMenuKind"
71
+ @confirm="confirmAuthDialog"
72
+ multi="false"/>
65
73
  </div>
66
74
  </template>
67
75
  <script>
68
76
  import {tableTreeMixins} from '@base/mixins/tableTree';
69
77
  import tableForm from "@base/components/table/tableForm";
70
78
  import {getBdEnv} from "@base/api/user";
79
+ import authDialog from "./authDialog.vue";
80
+ import userDialog from "@/views/user/user/dialog.vue";
81
+
71
82
 
72
83
  export default {
73
84
  name: 'menu_kind:list',
74
- components: {tableForm},
85
+ components: {userDialog, tableForm, authDialog},
75
86
  mixins: [tableTreeMixins],
76
87
  mounted() {
77
88
  this.getBdEnv();
@@ -83,11 +94,13 @@ export default {
83
94
  value10: '',
84
95
  dataId: '',
85
96
  formData: {
86
- enabled: ''
97
+ enabled: null
87
98
  },
88
99
  vxeOption: {},
89
100
  activeName: 'second',
90
- isDev: true
101
+ isDev: true,
102
+ showAuthDialog: false,
103
+ currentMenuKind: {}
91
104
  };
92
105
  },
93
106
  methods: {
@@ -98,6 +111,11 @@ export default {
98
111
  this.formData = {};
99
112
  this.$refs['table-m1'].commitProxy('reload');
100
113
  },
114
+ getSearchParam() {
115
+ return {
116
+ ...this.formData
117
+ };
118
+ },
101
119
  initTableList() {
102
120
  let that = this;
103
121
  let tableOption = {
@@ -109,7 +127,7 @@ export default {
109
127
  editSaveUrl: USER_PREFIX + '/menuKind/save',
110
128
  editDefaultRow: {enabled: true, orders: 99},
111
129
  param: row => {
112
- return this.formData;
130
+ return this.getSearchParam();
113
131
  },
114
132
  treeNodeParam: row => {
115
133
  return {
@@ -220,8 +238,9 @@ export default {
220
238
  },
221
239
  jsonExport() {
222
240
  this.$jsonExport({
223
- targetRef: "table-m1",
224
- url: USER_PREFIX + "/form_develop/exportMenuKind"
241
+ url: USER_PREFIX + "/form_develop/exportMenuKind",
242
+ data: this.getSearchParam(),
243
+ abcEnabled: false
225
244
  })
226
245
  },
227
246
  getBdEnv() {
@@ -230,6 +249,13 @@ export default {
230
249
  this.isDev = res.content == "dev"
231
250
  }
232
251
  });
252
+ },
253
+ openAuthDialog({row, rowIndex}) {
254
+ this.currentMenuKind = row;
255
+ this.showAuthDialog = true;
256
+ },
257
+ confirmAuthDialog() {
258
+
233
259
  }
234
260
  }
235
261
  };
@@ -357,7 +357,8 @@
357
357
  :taBm="referenceEntity"
358
358
  :multi="true"
359
359
  />
360
-
360
+ <preformDialog v-if="showPreformDialog" :visiable.sync="showPreformDialog"
361
+ @confirm="confirmPreformDialog"></preformDialog>
361
362
  </div>
362
363
  </template>
363
364
 
@@ -368,6 +369,7 @@ import MenuKindDialog from '../../../../views/bd/setting/menu_kind/dialog.vue';
368
369
  import zdDialog from '../../../../views/bd/setting/table_model/zdDialog.vue';
369
370
  import {getBdEnv} from "../../../../api/user";
370
371
  import projectTagView from "../../../../components/projectTag/view.vue";
372
+ import preformDialog from "@/views/bd/setting/form_template/preformDialog.vue";
371
373
 
372
374
  export default {
373
375
  name: 'szTaMbEdit',
@@ -376,6 +378,7 @@ export default {
376
378
  currentFormType: Object
377
379
  },
378
380
  components: {
381
+ preformDialog,
379
382
  projectTagView,
380
383
  szTaMbDialog,
381
384
  itemSzTaMbDialog,
@@ -417,7 +420,8 @@ export default {
417
420
  referenceShowRows: [],
418
421
  createdTableColumnStr: null,
419
422
  createdTableColumnArray: [],
420
- isDev: true
423
+ isDev: true,
424
+ showPreformDialog: false
421
425
 
422
426
  };
423
427
  },
@@ -499,42 +503,52 @@ export default {
499
503
  this.$baseAlert('明细不能为空!');
500
504
  return false;
501
505
  }
502
- this.$baseConfirm('您确定要保存吗?')
503
- .then(() => {
504
- const formData = this.szTaMb;
505
- formData.szTaZdMbDTOs = szTaZdMbDTOs;
506
+ this.szTaMb.szTaZdMbDTOs = szTaZdMbDTOs;
507
+ this.openPreformDialog();
506
508
 
507
- var url = USER_PREFIX + (this.isEdit ? `/szTaMb/update` : `/szTaMb/save`);
508
- this.$http({
509
- url: url,
510
- method: `post`,
511
- data: formData,
512
- isLoading: true,
513
- success: res => {
514
- this.$message({
515
- message: res.content,
516
- type: 'success',
517
- duration: 500,
518
- onClose: t => {
519
- if (this.isEdit) {
520
- this.$baseReload();
521
- } else {
522
- this.$baseReload({
523
- updateParam: {
524
- _dataId: res.objx
525
- }
526
- });
527
- }
528
- }
529
- });
530
- }
531
- });
532
- })
533
- .catch(() => {
534
- });
535
509
  }
536
510
  });
537
511
  },
512
+ saveDataHandle(preformData) {
513
+ let formData = {
514
+ ...this.szTaMb,
515
+ logContent: preformData.logContent
516
+ };
517
+ // const formData = this.szTaMb;
518
+ // formData.szTaZdMbDTOs = szTaZdMbDTOs;
519
+
520
+ var url = USER_PREFIX + (this.isEdit ? `/szTaMb/update` : `/szTaMb/save`);
521
+ this.$http({
522
+ url: url,
523
+ method: `post`,
524
+ data: formData,
525
+ isLoading: true,
526
+ success: res => {
527
+ this.$message({
528
+ message: res.content,
529
+ type: 'success',
530
+ duration: 500,
531
+ onClose: t => {
532
+ if (this.isEdit) {
533
+ this.$baseReload();
534
+ } else {
535
+ this.$baseReload({
536
+ updateParam: {
537
+ _dataId: res.objx
538
+ }
539
+ });
540
+ }
541
+ }
542
+ });
543
+ }
544
+ });
545
+ },
546
+ openPreformDialog() {
547
+ this.showPreformDialog = true;
548
+ },
549
+ confirmPreformDialog(preformData) {
550
+ this.saveDataHandle(preformData);
551
+ },
538
552
  initTableProduct() {
539
553
  const tableOption = {
540
554
  vue: this,
@@ -7,7 +7,7 @@
7
7
  </el-tab-pane>
8
8
  <el-tab-pane label="列表" name="second">
9
9
  <div class="tree-box fl">
10
- <div class="tit" @click="clearNodeClick"><b>表单分类</b></div>
10
+ <div class="tit"><b>表单分类</b></div>
11
11
  <div class="tree-btns" style="margin-top: 10px;">
12
12
  <!-- <el-button type="primary" plain icon="el-icon-circle-plus-outline" class="btn" @click="addFormType()">新增-->
13
13
  <!-- </el-button>-->
@@ -16,6 +16,7 @@
16
16
  <!-- </el-button>-->
17
17
  </div>
18
18
  <el-tree
19
+ v-if="showTree"
19
20
  :props="defaultProps"
20
21
  :load="loadNode"
21
22
  node-key="id"
@@ -42,7 +43,7 @@
42
43
  <tableForm :formData.sync="formData" @searchEvent="searchEvent" @resetEvent="resetEvent">
43
44
  <template #buttonLeft>
44
45
  <vxe-button status="primary" class="button-sty" icon="el-icon-plus" @click="openEditDialog"
45
- v-if="isDev">新增
46
+ v-if="isDev && currentFormType.addAuth===1">新增
46
47
  </vxe-button>
47
48
  <base-table-export :option="{ title: '数据表定义导出', targetRef: 'table-m1'}"
48
49
  :parent-target="_self" v-if="isDev"/>
@@ -64,6 +65,13 @@
64
65
  <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">搜索
65
66
  </vxe-button>
66
67
  </template>
68
+ <template #menuKindName>
69
+ <vxe-form-item title="表单分类:" field="tag">
70
+ <template v-slot>
71
+ <el-input v-model="currentMenuKindName" disabled></el-input>
72
+ </template>
73
+ </vxe-form-item>
74
+ </template>
67
75
  <template #tag>
68
76
  <vxe-form-item title="项目标签:" field="tag">
69
77
  <template v-slot>
@@ -161,7 +169,7 @@ export default {
161
169
  },
162
170
  showItemView: false,
163
171
  showMenuKindDialog: false,
164
- currentFormType: null,
172
+ currentFormType: {},
165
173
  addProjectTagOption: {
166
174
  url: USER_PREFIX + `/szTaMb/saveTag`,
167
175
  tableDatas: () => {
@@ -200,9 +208,19 @@ export default {
200
208
  },
201
209
  showProjectTagDialog3: false,
202
210
  checkTags: [],
203
- isDev: true
211
+ isDev: true,
212
+ menuKindAuth: {},
213
+ showTree: false
204
214
  };
205
215
  },
216
+ computed: {
217
+ currentMenuKindId() {
218
+ return this.currentFormType?.id || null
219
+ },
220
+ currentMenuKindName() {
221
+ return this.currentFormType?.name || null
222
+ }
223
+ },
206
224
  methods: {
207
225
  searchEvent() {
208
226
  this.$refs['table-m1'].commitProxy('reload');
@@ -210,7 +228,6 @@ export default {
210
228
  resetEvent() {
211
229
  this.formData = {};
212
230
  this.checkTags = [];
213
- this.currentFormType = null;
214
231
  this.$refs['table-m1'].commitProxy('reload');
215
232
  },
216
233
  openEditDialog(row) {
@@ -227,6 +244,18 @@ export default {
227
244
  this.$refs.xTabs.openEditTab(row);
228
245
  }
229
246
  },
247
+ getSearchParam() {
248
+ let tagCodes = null;
249
+ if (this.checkTags.length) {
250
+ tagCodes = this.checkTags.map(item => item.tagCode);
251
+ }
252
+ let currentFormType = this.currentFormType || {}
253
+ return {
254
+ ...this.formData,
255
+ menuKindCode: currentFormType.menuKindCode || null,
256
+ tagCodes
257
+ };
258
+ },
230
259
  initTableList() {
231
260
  let tableOption = {
232
261
  vue: this,
@@ -234,14 +263,7 @@ export default {
234
263
  tableName: 'bd_table_model_list-m1',
235
264
  path: USER_PREFIX + '/szTaMb/listPage',
236
265
  param: () => {
237
- let tagCodes = null;
238
- if (this.checkTags.length) {
239
- tagCodes = this.checkTags.map(item => item.tagCode);
240
- }
241
- return {
242
- ...this.formData,
243
- tagCodes
244
- };
266
+ return this.getSearchParam();
245
267
  },
246
268
  columns: [
247
269
  {type: 'checkbox', width: 48, resizable: false, fixed: 'left'},
@@ -345,35 +367,30 @@ export default {
345
367
  type: "input",
346
368
  common: true,
347
369
  disabled: true,
348
- defaultValueEnabled: false
370
+ defaultValueEnabled: false,
371
+ slot: "menuKindName"
349
372
  },
350
373
  {title: "实体名称", field: "taEn", type: "input", common: true},
351
374
  {title: "数据库表名", field: "taBm", type: "input", common: true},
352
375
  {title: "表描述", field: "taCh", type: "input", common: true},
353
376
  {title: "项目标签", field: "tag", type: "input", common: true, slot: "tag"},
354
- ]
377
+ ],
378
+ config: {
379
+ proxyConfig: {
380
+ autoLoad: false
381
+ }
382
+ },
355
383
  };
356
384
  this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
357
385
  this.vxeOption = opts;
386
+ this.showTree = true;
358
387
  });
359
388
  },
360
389
  handleNodeClick(data, node, v) {
361
- this.$set(this.formData, 'formTypeCode', data.formTypeCode);
362
- this.$set(this.formData, 'formTypeName', data.formTypeName);
363
- this.$set(this.formData, 'menuKindName', data.name);
364
- this.$set(this.formData, 'menuKindCode', data.menuKindCode);
365
- this.currentFormType = data;
390
+ this.handleNodeData(node)
366
391
  this.$forceUpdate();
367
392
  this.searchEvent();
368
393
  },
369
- clearNodeClick() {
370
- this.formData.menuKindCode = null;
371
- this.formData.menuKindName = null;
372
- // this.currentFormType = null;
373
- this.$refs.tree.setCurrentKey();
374
- this.searchEvent();
375
- },
376
-
377
394
  loadNode(node, resolve) {
378
395
  let id = node && node.data && node.data.id ? node.data.id || '' : 0;
379
396
  let param = {enabled: true};
@@ -390,10 +407,14 @@ export default {
390
407
  value.leaf = !value.hasChild;
391
408
  });
392
409
  if (node.level === 0) {
393
- if (res.objx.length > 0 && res.objx[0].hasChild) {
410
+ if (res.objx.length > 0) {
394
411
  this.$nextTick(() => {
395
- let nodedata = node.childNodes[0];
396
- nodedata.expand();
412
+ let firstNode = node.childNodes[0];
413
+ if (res.objx[0].hasChild) {
414
+ firstNode.expand();
415
+ }
416
+ this.$refs.tree.setCurrentKey(firstNode.data);
417
+ this.handleNodeClick(firstNode.data, firstNode, this)
397
418
  });
398
419
  }
399
420
  }
@@ -401,6 +422,23 @@ export default {
401
422
  }
402
423
  });
403
424
  },
425
+ handleNodeData(node) {
426
+ this.currentFormType = node ? node.data : null;
427
+ this.currentNode = node;
428
+ this.getMenuKindAuth();
429
+ },
430
+ getMenuKindAuth() {
431
+ this.$http({
432
+ url: USER_PREFIX + `/menu_kind_auth/getAuth`,
433
+ method: `post`,
434
+ data: {
435
+ id: this.currentMenuKindId,
436
+ },
437
+ success: (res) => {
438
+ this.menuKindAuth = res.objx || {};
439
+ },
440
+ });
441
+ },
404
442
 
405
443
  addFormType() {
406
444
  this.editFormTypeId = null;
@@ -451,8 +489,9 @@ export default {
451
489
  },
452
490
  jsonExport() {
453
491
  this.$jsonExport({
454
- targetRef: "table-m1",
455
- url: USER_PREFIX + "/form_develop/exportSzTaMb"
492
+ url: USER_PREFIX + "/form_develop/exportSzTaMb",
493
+ data: this.getSearchParam(),
494
+ abcEnabled: true
456
495
  })
457
496
  },
458
497
  getBdEnv() {
@@ -24,7 +24,7 @@ export default {
24
24
  };
25
25
  },
26
26
  created() {
27
- this.initHome();
27
+ this.init();
28
28
  },
29
29
  methods: {
30
30
  init() {
@@ -33,7 +33,9 @@ export default {
33
33
  method: 'post',
34
34
  success: res => {
35
35
  let userInfo = res.objx;
36
- this.getIsDistributor(userInfo);
36
+ if(userInfo.flag!==8){
37
+ this.initHome();
38
+ }
37
39
  }
38
40
  });
39
41
  },
@@ -2,9 +2,12 @@ import {encode} from "js-base64";
2
2
  import settingConfig from "@/settings";
3
3
 
4
4
  function getUrlParams(url) {
5
- let urlStr = url.split('?')[1];
6
- const urlSearchParams = new URLSearchParams(urlStr);
7
- const result = Object.fromEntries(urlSearchParams.entries());
5
+ let result = {};
6
+ if (url) {
7
+ let urlStr = url.split('?')[1];
8
+ const urlSearchParams = new URLSearchParams(urlStr);
9
+ result = Object.fromEntries(urlSearchParams.entries());
10
+ }
8
11
  return result;
9
12
  }
10
13
 
@@ -49,7 +52,8 @@ export default {
49
52
  username: null,
50
53
  smsCode: null
51
54
  },
52
- activeName: "first"
55
+ activeName: "first",
56
+ searchParam: {}
53
57
  };
54
58
  },
55
59
  watch: {
@@ -65,22 +69,7 @@ export default {
65
69
  }
66
70
  },
67
71
  created() {
68
-
69
- //小熊SSO返回判断--目前因为小熊单点返回ticket有问题要特殊处理
70
- let ssoParams = {};
71
- if (location.search) {
72
- ssoParams = getUrlParams(location.search);
73
- }
74
- // 获取URL参数
75
- const urlParams = this.$route.query;
76
- if (ssoParams.ticket || "bear_portalsso" == urlParams.access || urlParams.ticket) {
77
- //小熊单点登录
78
- this.bearSsoLogin();
79
- } else {
80
- //正常登陆
81
- this.login();
82
- }
83
-
72
+ this.init();
84
73
  },
85
74
  mounted() {
86
75
  // if (this.loginForm.username === '') {
@@ -94,6 +83,26 @@ export default {
94
83
  window.removeEventListener('keydown', this.keyDown, false);
95
84
  },
96
85
  methods: {
86
+ init() {
87
+ let searchParam = getUrlParams(location.search);
88
+ this.searchParam = searchParam;
89
+ //小熊SSO返回判断--目前因为小熊单点返回ticket有问题要特殊处理
90
+ let ssoParams = {};
91
+ if (location.search) {
92
+ ssoParams = searchParam;
93
+ }
94
+ // 获取URL参数
95
+ const urlParams = this.$route.query;
96
+ if (ssoParams.ticket || "bear_portalsso" == urlParams.access || urlParams.ticket) {
97
+ //小熊单点登录
98
+ this.bearSsoLogin();
99
+ } else if (searchParam.gatewayToken) {
100
+ this.handleGatewayTokenLogin();
101
+ } else {
102
+ //正常登陆
103
+ this.login();
104
+ }
105
+ },
97
106
  keyDown(e) {
98
107
  //如果是回车则执行登录方法
99
108
  if (e.keyCode == 13 && e.target.nodeName != 'INPUT') {
@@ -353,9 +362,12 @@ export default {
353
362
  path = '/';
354
363
  }
355
364
  this.getWebPrefix((webPrefix) => {
356
- let prefix = webPrefix ? ('/' + webPrefix) : null;
365
+ let prefix = webPrefix ? ('/' + webPrefix) : '';
366
+ let ssotoken = this.searchParam.gatewayToken;
357
367
  if (prefix && prefix !== window.WEB_PREFIX) {
358
368
  location.href = prefix + '/index.html' + path
369
+ } else if (!!ssotoken) {
370
+ location.href = prefix + '/index.html' + path
359
371
  } else {
360
372
  this.$router.push({
361
373
  path: path
@@ -393,6 +405,18 @@ export default {
393
405
  callback && callback(webPrefix)
394
406
  }
395
407
  });
408
+ },
409
+ handleGatewayTokenLogin() {
410
+ let ssotoken = this.searchParam.gatewayToken
411
+ this.$store
412
+ .dispatch('user/login2', {ssotoken})
413
+ .then(res => {
414
+ if (res.type == "success") {
415
+ this.$nextTick(() => {
416
+ this.handleRedirectUrl()
417
+ });
418
+ }
419
+ });
396
420
  }
397
421
  }
398
422
  }